@Only-api
@Post
@Get
@Delete
@Patient
Feature: Patient resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Patient node. This resource is part of the Subject of Care.
File name: xaa.feature
Relative path: api/xaa.feature
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:33:42.303 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CALVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "133775"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE ANGEL ROMAN CALVO",
"family": "ROMAN",
"given": [
"JOSE ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "herzog.gregorio@okuneva.com"
},
{
"system": "phone",
"value": "34 (804) 417-6044"
}
],
"gender": "male",
"birthDate": "2012-12-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:33:43.129 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:33:43.130 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HBKUPyqeh1eKiXno"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13739/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:33:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13739/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:33:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:33:43.131 [print] {
"resourceType": "Patient",
"id": "13739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:47.592+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE ANGEL <b>ROMAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>133775</td></tr><tr><td>Date of birth</td><td><span>31 December 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CALVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "133775"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE ANGEL ROMAN CALVO",
"family": "ROMAN",
"given": [
"JOSE ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "herzog.gregorio@okuneva.com"
},
{
"system": "phone",
"value": "34 (804) 417-6044"
}
],
"gender": "male",
"birthDate": "2012-12-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:33:43.131 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:33:43.135 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:33:43.135 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HBKUPyqeh1eKiXno"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13739/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:33:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13739/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:33:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:33:43.135 [print] {
"resourceType": "Patient",
"id": "13739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:47.592+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE ANGEL <b>ROMAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>133775</td></tr><tr><td>Date of birth</td><td><span>31 December 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CALVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "133775"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE ANGEL ROMAN CALVO",
"family": "ROMAN",
"given": [
"JOSE ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "herzog.gregorio@okuneva.com"
},
{
"system": "phone",
"value": "34 (804) 417-6044"
}
],
"gender": "male",
"birthDate": "2012-12-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:33:43.135 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:33:43.791 [print] {
"resourceType": "Patient",
"id": "13739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:47.592+02:00",
"source": "#HBKUPyqeh1eKiXno",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE ANGEL <b>ROMAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>133775</td></tr><tr><td>Date of birth</td><td><span>31 December 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CALVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "133775"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE ANGEL ROMAN CALVO",
"family": "ROMAN",
"given": [
"JOSE ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "herzog.gregorio@okuneva.com"
},
{
"system": "phone",
"value": "34 (804) 417-6044"
}
],
"gender": "male",
"birthDate": "2012-12-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:33:44.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 21ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 21ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:33:46.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:33:49.074+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:33:49.074+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:33:46.085 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "183642"
}
],
"name": [
{
"use": "anonymous",
"text": "MOHAMED VIDAL HERRERA",
"family": "VIDAL",
"given": [
"MOHAMED"
]
}
],
"telecom": [
{
"system": "email",
"value": "maci87@kunze.com"
},
{
"system": "phone",
"value": "34 (949) 402-2642"
}
],
"gender": "male",
"birthDate": "2013-01-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:33:46.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:33:46.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yKvNSzTbMw9wh38S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13740/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:33:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13740/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:33:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:33:46.822 [print] {
"resourceType": "Patient",
"id": "13740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:51.393+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MOHAMED <b>VIDAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>183642</td></tr><tr><td>Date of birth</td><td><span>10 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "183642"
}
],
"name": [
{
"use": "anonymous",
"text": "MOHAMED VIDAL HERRERA",
"family": "VIDAL",
"given": [
"MOHAMED"
]
}
],
"telecom": [
{
"system": "email",
"value": "maci87@kunze.com"
},
{
"system": "phone",
"value": "34 (949) 402-2642"
}
],
"gender": "male",
"birthDate": "2013-01-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:33:46.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:33:46.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:33:46.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yKvNSzTbMw9wh38S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13740/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:33:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13740/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:33:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:33:46.822 [print] {
"resourceType": "Patient",
"id": "13740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:51.393+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MOHAMED <b>VIDAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>183642</td></tr><tr><td>Date of birth</td><td><span>10 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "183642"
}
],
"name": [
{
"use": "anonymous",
"text": "MOHAMED VIDAL HERRERA",
"family": "VIDAL",
"given": [
"MOHAMED"
]
}
],
"telecom": [
{
"system": "email",
"value": "maci87@kunze.com"
},
{
"system": "phone",
"value": "34 (949) 402-2642"
}
],
"gender": "male",
"birthDate": "2013-01-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:33:46.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:33:48.439 [print] {
"resourceType": "Patient",
"id": "13740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:51.393+02:00",
"source": "#yKvNSzTbMw9wh38S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MOHAMED <b>VIDAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>183642</td></tr><tr><td>Date of birth</td><td><span>10 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "183642"
}
],
"name": [
{
"use": "anonymous",
"text": "MOHAMED VIDAL HERRERA",
"family": "VIDAL",
"given": [
"MOHAMED"
]
}
],
"telecom": [
{
"system": "email",
"value": "maci87@kunze.com"
},
{
"system": "phone",
"value": "34 (949) 402-2642"
}
],
"gender": "male",
"birthDate": "2013-01-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:33:49.033 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:33:49.648 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:33:53.679+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:33:53.679+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:33:49.651 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "120212"
}
],
"name": [
{
"use": "anonymous",
"text": "EMILIO CAMPOS HERNANDEZ",
"family": "CAMPOS",
"given": [
"EMILIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "whomenick@gmail.com"
},
{
"system": "phone",
"value": "34 (347) 308-5564"
}
],
"gender": "male",
"birthDate": "2013-02-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:33:51.885 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:33:51.885 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PLiALJ0D2CN9sPMg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13741/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:33:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13741/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:33:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:33:51.885 [print] {
"resourceType": "Patient",
"id": "13741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:56.491+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EMILIO <b>CAMPOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>120212</td></tr><tr><td>Date of birth</td><td><span>06 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "120212"
}
],
"name": [
{
"use": "anonymous",
"text": "EMILIO CAMPOS HERNANDEZ",
"family": "CAMPOS",
"given": [
"EMILIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "whomenick@gmail.com"
},
{
"system": "phone",
"value": "34 (347) 308-5564"
}
],
"gender": "male",
"birthDate": "2013-02-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:33:51.885 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:33:51.888 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:33:51.888 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PLiALJ0D2CN9sPMg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13741/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:33:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13741/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:33:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:33:51.888 [print] {
"resourceType": "Patient",
"id": "13741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:56.491+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EMILIO <b>CAMPOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>120212</td></tr><tr><td>Date of birth</td><td><span>06 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "120212"
}
],
"name": [
{
"use": "anonymous",
"text": "EMILIO CAMPOS HERNANDEZ",
"family": "CAMPOS",
"given": [
"EMILIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "whomenick@gmail.com"
},
{
"system": "phone",
"value": "34 (347) 308-5564"
}
],
"gender": "male",
"birthDate": "2013-02-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:33:51.888 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:33:52.491 [print] {
"resourceType": "Patient",
"id": "13741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:33:56.491+02:00",
"source": "#PLiALJ0D2CN9sPMg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EMILIO <b>CAMPOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>120212</td></tr><tr><td>Date of birth</td><td><span>06 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "120212"
}
],
"name": [
{
"use": "anonymous",
"text": "EMILIO CAMPOS HERNANDEZ",
"family": "CAMPOS",
"given": [
"EMILIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "whomenick@gmail.com"
},
{
"system": "phone",
"value": "34 (347) 308-5564"
}
],
"gender": "male",
"birthDate": "2013-02-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:33:53.125 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:33:54.761 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:33:57.775+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:33:57.775+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:33:54.761 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VIDAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "145880"
}
],
"name": [
{
"use": "anonymous",
"text": "ANTONIO GARCIA VIDAL",
"family": "GARCIA",
"given": [
"ANTONIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "burdette.kilback@yahoo.com"
},
{
"system": "phone",
"value": "34 (555) 794-8320"
}
],
"gender": "male",
"birthDate": "2013-12-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:33:56.703 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:33:56.703 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q3obxmUHxzUGELQv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13742/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13742/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:33:56.704 [print] {
"resourceType": "Patient",
"id": "13742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:01.338+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANTONIO <b>GARCIA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>145880</td></tr><tr><td>Date of birth</td><td><span>09 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VIDAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "145880"
}
],
"name": [
{
"use": "anonymous",
"text": "ANTONIO GARCIA VIDAL",
"family": "GARCIA",
"given": [
"ANTONIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "burdette.kilback@yahoo.com"
},
{
"system": "phone",
"value": "34 (555) 794-8320"
}
],
"gender": "male",
"birthDate": "2013-12-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:33:56.704 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:33:56.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:33:56.706 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q3obxmUHxzUGELQv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13742/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13742/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:33:56.706 [print] {
"resourceType": "Patient",
"id": "13742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:01.338+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANTONIO <b>GARCIA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>145880</td></tr><tr><td>Date of birth</td><td><span>09 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VIDAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "145880"
}
],
"name": [
{
"use": "anonymous",
"text": "ANTONIO GARCIA VIDAL",
"family": "GARCIA",
"given": [
"ANTONIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "burdette.kilback@yahoo.com"
},
{
"system": "phone",
"value": "34 (555) 794-8320"
}
],
"gender": "male",
"birthDate": "2013-12-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:33:56.707 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:33:57.406 [print] {
"resourceType": "Patient",
"id": "13742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:01.338+02:00",
"source": "#Q3obxmUHxzUGELQv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANTONIO <b>GARCIA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>145880</td></tr><tr><td>Date of birth</td><td><span>09 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VIDAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "145880"
}
],
"name": [
{
"use": "anonymous",
"text": "ANTONIO GARCIA VIDAL",
"family": "GARCIA",
"given": [
"ANTONIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "burdette.kilback@yahoo.com"
},
{
"system": "phone",
"value": "34 (555) 794-8320"
}
],
"gender": "male",
"birthDate": "2013-12-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:33:58.028 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:33:58.637 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:02.689+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:02.689+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:33:58.639 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "AGUILAR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "143625"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBERT RIVERA AGUILAR",
"family": "RIVERA",
"given": [
"ALBERT"
]
}
],
"telecom": [
{
"system": "email",
"value": "elwin.buckridge@yahoo.com"
},
{
"system": "phone",
"value": "34 (636) 708-8381"
}
],
"gender": "male",
"birthDate": "2014-06-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:00.332 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:00.332 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jcKgQTIDhB2OEvCt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13743/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13743/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:00.332 [print] {
"resourceType": "Patient",
"id": "13743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:04.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBERT <b>RIVERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>143625</td></tr><tr><td>Date of birth</td><td><span>16 June 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "AGUILAR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "143625"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBERT RIVERA AGUILAR",
"family": "RIVERA",
"given": [
"ALBERT"
]
}
],
"telecom": [
{
"system": "email",
"value": "elwin.buckridge@yahoo.com"
},
{
"system": "phone",
"value": "34 (636) 708-8381"
}
],
"gender": "male",
"birthDate": "2014-06-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:00.332 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:00.335 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:00.335 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jcKgQTIDhB2OEvCt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13743/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13743/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:00.335 [print] {
"resourceType": "Patient",
"id": "13743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:04.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBERT <b>RIVERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>143625</td></tr><tr><td>Date of birth</td><td><span>16 June 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "AGUILAR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "143625"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBERT RIVERA AGUILAR",
"family": "RIVERA",
"given": [
"ALBERT"
]
}
],
"telecom": [
{
"system": "email",
"value": "elwin.buckridge@yahoo.com"
},
{
"system": "phone",
"value": "34 (636) 708-8381"
}
],
"gender": "male",
"birthDate": "2014-06-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:00.335 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:00.943 [print] {
"resourceType": "Patient",
"id": "13743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:04.956+02:00",
"source": "#jcKgQTIDhB2OEvCt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBERT <b>RIVERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>143625</td></tr><tr><td>Date of birth</td><td><span>16 June 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "AGUILAR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "143625"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBERT RIVERA AGUILAR",
"family": "RIVERA",
"given": [
"ALBERT"
]
}
],
"telecom": [
{
"system": "email",
"value": "elwin.buckridge@yahoo.com"
},
{
"system": "phone",
"value": "34 (636) 708-8381"
}
],
"gender": "male",
"birthDate": "2014-06-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:01.614 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:02.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:06.269+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:06.269+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:02.203 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "79697"
}
],
"name": [
{
"use": "anonymous",
"text": "NOELIA DIEZ GIMENEZ",
"family": "DIEZ",
"given": [
"NOELIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "addison40@ondricka.net"
},
{
"system": "phone",
"value": "34 (936) 215-4588"
}
],
"gender": "female",
"birthDate": "2014-07-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:02.810 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:02.810 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8jvfCqDZEe9Lbr6Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13744/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13744/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:02.810 [print] {
"resourceType": "Patient",
"id": "13744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:07.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NOELIA <b>DIEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>79697</td></tr><tr><td>Date of birth</td><td><span>23 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "79697"
}
],
"name": [
{
"use": "anonymous",
"text": "NOELIA DIEZ GIMENEZ",
"family": "DIEZ",
"given": [
"NOELIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "addison40@ondricka.net"
},
{
"system": "phone",
"value": "34 (936) 215-4588"
}
],
"gender": "female",
"birthDate": "2014-07-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:02.810 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:02.810 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:02.810 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8jvfCqDZEe9Lbr6Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13744/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13744/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:02.810 [print] {
"resourceType": "Patient",
"id": "13744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:07.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NOELIA <b>DIEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>79697</td></tr><tr><td>Date of birth</td><td><span>23 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "79697"
}
],
"name": [
{
"use": "anonymous",
"text": "NOELIA DIEZ GIMENEZ",
"family": "DIEZ",
"given": [
"NOELIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "addison40@ondricka.net"
},
{
"system": "phone",
"value": "34 (936) 215-4588"
}
],
"gender": "female",
"birthDate": "2014-07-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:02.810 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:04.716 [print] {
"resourceType": "Patient",
"id": "13744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:07.441+02:00",
"source": "#8jvfCqDZEe9Lbr6Q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NOELIA <b>DIEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>79697</td></tr><tr><td>Date of birth</td><td><span>23 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "79697"
}
],
"name": [
{
"use": "anonymous",
"text": "NOELIA DIEZ GIMENEZ",
"family": "DIEZ",
"given": [
"NOELIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "addison40@ondricka.net"
},
{
"system": "phone",
"value": "34 (936) 215-4588"
}
],
"gender": "female",
"birthDate": "2014-07-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:05.392 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:05.998 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:10.052+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:10.052+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:06.000 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IBAÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "171130"
}
],
"name": [
{
"use": "anonymous",
"text": "GUILLERMO CABRERA IBAÑEZ",
"family": "CABRERA",
"given": [
"GUILLERMO"
]
}
],
"telecom": [
{
"system": "email",
"value": "isabella.green@hodkiewicz.net"
},
{
"system": "phone",
"value": "34 (296) 214-3883"
}
],
"gender": "male",
"birthDate": "2014-08-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:06.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:06.627 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"97uOvlbumMWusTvv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13745/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13745/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:06.627 [print] {
"resourceType": "Patient",
"id": "13745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:11.262+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GUILLERMO <b>CABRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>171130</td></tr><tr><td>Date of birth</td><td><span>13 August 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IBAÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "171130"
}
],
"name": [
{
"use": "anonymous",
"text": "GUILLERMO CABRERA IBAÑEZ",
"family": "CABRERA",
"given": [
"GUILLERMO"
]
}
],
"telecom": [
{
"system": "email",
"value": "isabella.green@hodkiewicz.net"
},
{
"system": "phone",
"value": "34 (296) 214-3883"
}
],
"gender": "male",
"birthDate": "2014-08-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:06.627 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:06.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:06.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"97uOvlbumMWusTvv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13745/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13745/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:06.630 [print] {
"resourceType": "Patient",
"id": "13745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:11.262+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GUILLERMO <b>CABRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>171130</td></tr><tr><td>Date of birth</td><td><span>13 August 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IBAÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "171130"
}
],
"name": [
{
"use": "anonymous",
"text": "GUILLERMO CABRERA IBAÑEZ",
"family": "CABRERA",
"given": [
"GUILLERMO"
]
}
],
"telecom": [
{
"system": "email",
"value": "isabella.green@hodkiewicz.net"
},
{
"system": "phone",
"value": "34 (296) 214-3883"
}
],
"gender": "male",
"birthDate": "2014-08-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:06.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:07.210 [print] {
"resourceType": "Patient",
"id": "13745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:11.262+02:00",
"source": "#97uOvlbumMWusTvv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GUILLERMO <b>CABRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>171130</td></tr><tr><td>Date of birth</td><td><span>13 August 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IBAÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "171130"
}
],
"name": [
{
"use": "anonymous",
"text": "GUILLERMO CABRERA IBAÑEZ",
"family": "CABRERA",
"given": [
"GUILLERMO"
]
}
],
"telecom": [
{
"system": "email",
"value": "isabella.green@hodkiewicz.net"
},
{
"system": "phone",
"value": "34 (296) 214-3883"
}
],
"gender": "male",
"birthDate": "2014-08-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:07.856 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:08.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:12.503+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:12.503+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:08.463 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NUÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54490"
}
],
"name": [
{
"use": "anonymous",
"text": "NURIA ORTIZ NUÑEZ",
"family": "ORTIZ",
"given": [
"NURIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hgoyette@gmail.com"
},
{
"system": "phone",
"value": "34 (634) 489-1420"
}
],
"gender": "female",
"birthDate": "2014-08-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:09.176 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:09.176 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A9rezK3CrKusaWiF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13746/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13746/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:09.176 [print] {
"resourceType": "Patient",
"id": "13746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:13.776+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NURIA <b>ORTIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54490</td></tr><tr><td>Date of birth</td><td><span>27 August 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NUÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54490"
}
],
"name": [
{
"use": "anonymous",
"text": "NURIA ORTIZ NUÑEZ",
"family": "ORTIZ",
"given": [
"NURIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hgoyette@gmail.com"
},
{
"system": "phone",
"value": "34 (634) 489-1420"
}
],
"gender": "female",
"birthDate": "2014-08-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:09.176 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:09.176 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:09.176 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A9rezK3CrKusaWiF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13746/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13746/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:09.176 [print] {
"resourceType": "Patient",
"id": "13746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:13.776+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NURIA <b>ORTIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54490</td></tr><tr><td>Date of birth</td><td><span>27 August 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NUÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54490"
}
],
"name": [
{
"use": "anonymous",
"text": "NURIA ORTIZ NUÑEZ",
"family": "ORTIZ",
"given": [
"NURIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hgoyette@gmail.com"
},
{
"system": "phone",
"value": "34 (634) 489-1420"
}
],
"gender": "female",
"birthDate": "2014-08-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:09.176 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:09.801 [print] {
"resourceType": "Patient",
"id": "13746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:13.776+02:00",
"source": "#A9rezK3CrKusaWiF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NURIA <b>ORTIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54490</td></tr><tr><td>Date of birth</td><td><span>27 August 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NUÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54490"
}
],
"name": [
{
"use": "anonymous",
"text": "NURIA ORTIZ NUÑEZ",
"family": "ORTIZ",
"given": [
"NURIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hgoyette@gmail.com"
},
{
"system": "phone",
"value": "34 (634) 489-1420"
}
],
"gender": "female",
"birthDate": "2014-08-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:10.422 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:11.410 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:15.071+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:15.071+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:11.413 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALONSO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9520"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA SOLEDAD GALLARDO ALONSO",
"family": "GALLARDO",
"given": [
"MARIA SOLEDAD"
]
}
],
"telecom": [
{
"system": "email",
"value": "dyundt@hotmail.com"
},
{
"system": "phone",
"value": "34 (763) 327-3098"
}
],
"gender": "female",
"birthDate": "2014-09-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:12.031 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"807"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:12.031 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6lyaJbtM6u3eg4ny"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13747/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13747/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:12.031 [print] {
"resourceType": "Patient",
"id": "13747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:16.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA SOLEDAD <b>GALLARDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9520</td></tr><tr><td>Date of birth</td><td><span>23 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALONSO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9520"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA SOLEDAD GALLARDO ALONSO",
"family": "GALLARDO",
"given": [
"MARIA SOLEDAD"
]
}
],
"telecom": [
{
"system": "email",
"value": "dyundt@hotmail.com"
},
{
"system": "phone",
"value": "34 (763) 327-3098"
}
],
"gender": "female",
"birthDate": "2014-09-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:12.031 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:12.033 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"807"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:12.033 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6lyaJbtM6u3eg4ny"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13747/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13747/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:12.033 [print] {
"resourceType": "Patient",
"id": "13747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:16.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA SOLEDAD <b>GALLARDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9520</td></tr><tr><td>Date of birth</td><td><span>23 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALONSO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9520"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA SOLEDAD GALLARDO ALONSO",
"family": "GALLARDO",
"given": [
"MARIA SOLEDAD"
]
}
],
"telecom": [
{
"system": "email",
"value": "dyundt@hotmail.com"
},
{
"system": "phone",
"value": "34 (763) 327-3098"
}
],
"gender": "female",
"birthDate": "2014-09-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:12.033 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:12.657 [print] {
"resourceType": "Patient",
"id": "13747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:16.661+02:00",
"source": "#6lyaJbtM6u3eg4ny",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA SOLEDAD <b>GALLARDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9520</td></tr><tr><td>Date of birth</td><td><span>23 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALONSO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9520"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA SOLEDAD GALLARDO ALONSO",
"family": "GALLARDO",
"given": [
"MARIA SOLEDAD"
]
}
],
"telecom": [
{
"system": "email",
"value": "dyundt@hotmail.com"
},
{
"system": "phone",
"value": "34 (763) 327-3098"
}
],
"gender": "female",
"birthDate": "2014-09-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:13.299 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:14.138 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:17.953+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:17.953+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:14.140 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTIAGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "137883"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ANGELES DIAZ SANTIAGO",
"family": "DIAZ",
"given": [
"MARIA ANGELES"
]
}
],
"telecom": [
{
"system": "email",
"value": "dave06@gmail.com"
},
{
"system": "phone",
"value": "34 (797) 846-7413"
}
],
"gender": "female",
"birthDate": "2015-04-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:14.973 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:14.973 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dK73Iw1826Sqxhps"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13748/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13748/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:14.973 [print] {
"resourceType": "Patient",
"id": "13748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:19.617+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ANGELES <b>DIAZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>137883</td></tr><tr><td>Date of birth</td><td><span>22 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTIAGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "137883"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ANGELES DIAZ SANTIAGO",
"family": "DIAZ",
"given": [
"MARIA ANGELES"
]
}
],
"telecom": [
{
"system": "email",
"value": "dave06@gmail.com"
},
{
"system": "phone",
"value": "34 (797) 846-7413"
}
],
"gender": "female",
"birthDate": "2015-04-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:14.973 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:14.973 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:14.973 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dK73Iw1826Sqxhps"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13748/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13748/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:14.973 [print] {
"resourceType": "Patient",
"id": "13748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:19.617+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ANGELES <b>DIAZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>137883</td></tr><tr><td>Date of birth</td><td><span>22 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTIAGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "137883"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ANGELES DIAZ SANTIAGO",
"family": "DIAZ",
"given": [
"MARIA ANGELES"
]
}
],
"telecom": [
{
"system": "email",
"value": "dave06@gmail.com"
},
{
"system": "phone",
"value": "34 (797) 846-7413"
}
],
"gender": "female",
"birthDate": "2015-04-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:14.973 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:15.618 [print] {
"resourceType": "Patient",
"id": "13748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:19.617+02:00",
"source": "#dK73Iw1826Sqxhps",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ANGELES <b>DIAZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>137883</td></tr><tr><td>Date of birth</td><td><span>22 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTIAGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "137883"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ANGELES DIAZ SANTIAGO",
"family": "DIAZ",
"given": [
"MARIA ANGELES"
]
}
],
"telecom": [
{
"system": "email",
"value": "dave06@gmail.com"
},
{
"system": "phone",
"value": "34 (797) 846-7413"
}
],
"gender": "female",
"birthDate": "2015-04-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:16.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:17.013 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:21.070+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:21.070+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:17.015 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142330"
}
],
"name": [
{
"use": "anonymous",
"text": "SANTIAGO CASTILLO MORA",
"family": "CASTILLO",
"given": [
"SANTIAGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "marilie.mckenzie@jerde.com"
},
{
"system": "phone",
"value": "34 (242) 798-4930"
}
],
"gender": "male",
"birthDate": "2015-05-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:17.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:17.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r5oPpfO12B0RUycP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13749/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13749/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:17.631 [print] {
"resourceType": "Patient",
"id": "13749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:22.265+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SANTIAGO <b>CASTILLO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142330</td></tr><tr><td>Date of birth</td><td><span>12 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142330"
}
],
"name": [
{
"use": "anonymous",
"text": "SANTIAGO CASTILLO MORA",
"family": "CASTILLO",
"given": [
"SANTIAGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "marilie.mckenzie@jerde.com"
},
{
"system": "phone",
"value": "34 (242) 798-4930"
}
],
"gender": "male",
"birthDate": "2015-05-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:17.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:17.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:17.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r5oPpfO12B0RUycP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13749/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13749/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:17.631 [print] {
"resourceType": "Patient",
"id": "13749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:22.265+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SANTIAGO <b>CASTILLO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142330</td></tr><tr><td>Date of birth</td><td><span>12 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142330"
}
],
"name": [
{
"use": "anonymous",
"text": "SANTIAGO CASTILLO MORA",
"family": "CASTILLO",
"given": [
"SANTIAGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "marilie.mckenzie@jerde.com"
},
{
"system": "phone",
"value": "34 (242) 798-4930"
}
],
"gender": "male",
"birthDate": "2015-05-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:17.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:19.289 [print] {
"resourceType": "Patient",
"id": "13749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:22.265+02:00",
"source": "#r5oPpfO12B0RUycP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SANTIAGO <b>CASTILLO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142330</td></tr><tr><td>Date of birth</td><td><span>12 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142330"
}
],
"name": [
{
"use": "anonymous",
"text": "SANTIAGO CASTILLO MORA",
"family": "CASTILLO",
"given": [
"SANTIAGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "marilie.mckenzie@jerde.com"
},
{
"system": "phone",
"value": "34 (242) 798-4930"
}
],
"gender": "male",
"birthDate": "2015-05-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:19.920 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:20.547 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:24.575+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:24.575+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:20.547 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HIDALGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "151510"
}
],
"name": [
{
"use": "anonymous",
"text": "MARC GALLEGO HIDALGO",
"family": "GALLEGO",
"given": [
"MARC"
]
}
],
"telecom": [
{
"system": "email",
"value": "rutherford.ernie@hotmail.com"
},
{
"system": "phone",
"value": "34 (801) 660-8325"
}
],
"gender": "male",
"birthDate": "2015-05-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:21.281 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:21.281 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rDCHbkwglvJAEuuJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13750/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13750/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:21.281 [print] {
"resourceType": "Patient",
"id": "13750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:25.912+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARC <b>GALLEGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>151510</td></tr><tr><td>Date of birth</td><td><span>25 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HIDALGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "151510"
}
],
"name": [
{
"use": "anonymous",
"text": "MARC GALLEGO HIDALGO",
"family": "GALLEGO",
"given": [
"MARC"
]
}
],
"telecom": [
{
"system": "email",
"value": "rutherford.ernie@hotmail.com"
},
{
"system": "phone",
"value": "34 (801) 660-8325"
}
],
"gender": "male",
"birthDate": "2015-05-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:21.281 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:21.284 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:21.284 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rDCHbkwglvJAEuuJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13750/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13750/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:21.284 [print] {
"resourceType": "Patient",
"id": "13750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:25.912+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARC <b>GALLEGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>151510</td></tr><tr><td>Date of birth</td><td><span>25 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HIDALGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "151510"
}
],
"name": [
{
"use": "anonymous",
"text": "MARC GALLEGO HIDALGO",
"family": "GALLEGO",
"given": [
"MARC"
]
}
],
"telecom": [
{
"system": "email",
"value": "rutherford.ernie@hotmail.com"
},
{
"system": "phone",
"value": "34 (801) 660-8325"
}
],
"gender": "male",
"birthDate": "2015-05-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:21.284 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:21.887 [print] {
"resourceType": "Patient",
"id": "13750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:25.912+02:00",
"source": "#rDCHbkwglvJAEuuJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARC <b>GALLEGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>151510</td></tr><tr><td>Date of birth</td><td><span>25 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HIDALGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "151510"
}
],
"name": [
{
"use": "anonymous",
"text": "MARC GALLEGO HIDALGO",
"family": "GALLEGO",
"given": [
"MARC"
]
}
],
"telecom": [
{
"system": "email",
"value": "rutherford.ernie@hotmail.com"
},
{
"system": "phone",
"value": "34 (801) 660-8325"
}
],
"gender": "male",
"birthDate": "2015-05-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:22.551 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:23.552 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:27.190+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:27.190+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:23.555 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "JIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "209676"
}
],
"name": [
{
"use": "anonymous",
"text": "YOLANDA LEON JIMENEZ",
"family": "LEON",
"given": [
"YOLANDA"
]
}
],
"telecom": [
{
"system": "email",
"value": "myrna.goldner@prohaska.com"
},
{
"system": "phone",
"value": "34 (422) 686-0811"
}
],
"gender": "female",
"birthDate": "2015-06-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:24.468 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:24.468 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2YLrGWjkEgA1ch7T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13751/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13751/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:24.468 [print] {
"resourceType": "Patient",
"id": "13751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:29.082+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">YOLANDA <b>LEON </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>209676</td></tr><tr><td>Date of birth</td><td><span>24 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "JIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "209676"
}
],
"name": [
{
"use": "anonymous",
"text": "YOLANDA LEON JIMENEZ",
"family": "LEON",
"given": [
"YOLANDA"
]
}
],
"telecom": [
{
"system": "email",
"value": "myrna.goldner@prohaska.com"
},
{
"system": "phone",
"value": "34 (422) 686-0811"
}
],
"gender": "female",
"birthDate": "2015-06-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:24.468 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:24.470 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:24.470 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2YLrGWjkEgA1ch7T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13751/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13751/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:24.471 [print] {
"resourceType": "Patient",
"id": "13751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:29.082+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">YOLANDA <b>LEON </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>209676</td></tr><tr><td>Date of birth</td><td><span>24 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "JIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "209676"
}
],
"name": [
{
"use": "anonymous",
"text": "YOLANDA LEON JIMENEZ",
"family": "LEON",
"given": [
"YOLANDA"
]
}
],
"telecom": [
{
"system": "email",
"value": "myrna.goldner@prohaska.com"
},
{
"system": "phone",
"value": "34 (422) 686-0811"
}
],
"gender": "female",
"birthDate": "2015-06-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:24.471 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:25.065 [print] {
"resourceType": "Patient",
"id": "13751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:29.082+02:00",
"source": "#2YLrGWjkEgA1ch7T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">YOLANDA <b>LEON </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>209676</td></tr><tr><td>Date of birth</td><td><span>24 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "JIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "209676"
}
],
"name": [
{
"use": "anonymous",
"text": "YOLANDA LEON JIMENEZ",
"family": "LEON",
"given": [
"YOLANDA"
]
}
],
"telecom": [
{
"system": "email",
"value": "myrna.goldner@prohaska.com"
},
{
"system": "phone",
"value": "34 (422) 686-0811"
}
],
"gender": "female",
"birthDate": "2015-06-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:25.659 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:26.264 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:30.304+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:30.304+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:26.264 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERRER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "147874"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA VICTORIA GIMENEZ FERRER",
"family": "GIMENEZ",
"given": [
"MARIA VICTORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dnicolas@hand.biz"
},
{
"system": "phone",
"value": "34 (752) 977-4611"
}
],
"gender": "female",
"birthDate": "2015-09-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:26.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:26.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q89gnTf7SKRWpNwC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13952/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:26.902 [print] {
"resourceType": "Patient",
"id": "13952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:31.540+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA VICTORIA <b>GIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>147874</td></tr><tr><td>Date of birth</td><td><span>08 September 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERRER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "147874"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA VICTORIA GIMENEZ FERRER",
"family": "GIMENEZ",
"given": [
"MARIA VICTORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dnicolas@hand.biz"
},
{
"system": "phone",
"value": "34 (752) 977-4611"
}
],
"gender": "female",
"birthDate": "2015-09-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:26.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:26.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:26.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q89gnTf7SKRWpNwC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13952/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:26.909 [print] {
"resourceType": "Patient",
"id": "13952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:31.540+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA VICTORIA <b>GIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>147874</td></tr><tr><td>Date of birth</td><td><span>08 September 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERRER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "147874"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA VICTORIA GIMENEZ FERRER",
"family": "GIMENEZ",
"given": [
"MARIA VICTORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dnicolas@hand.biz"
},
{
"system": "phone",
"value": "34 (752) 977-4611"
}
],
"gender": "female",
"birthDate": "2015-09-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:26.909 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:28.466 [print] {
"resourceType": "Patient",
"id": "13952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:31.540+02:00",
"source": "#Q89gnTf7SKRWpNwC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA VICTORIA <b>GIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>147874</td></tr><tr><td>Date of birth</td><td><span>08 September 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERRER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "147874"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA VICTORIA GIMENEZ FERRER",
"family": "GIMENEZ",
"given": [
"MARIA VICTORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dnicolas@hand.biz"
},
{
"system": "phone",
"value": "34 (752) 977-4611"
}
],
"gender": "female",
"birthDate": "2015-09-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:30.285 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:30.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:34.021+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:34.021+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:30.876 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VICENTE"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "104151"
}
],
"name": [
{
"use": "anonymous",
"text": "MANUEL RODRIGUEZ VICENTE",
"family": "RODRIGUEZ",
"given": [
"MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "retta74@hotmail.com"
},
{
"system": "phone",
"value": "34 (777) 989-5135"
}
],
"gender": "male",
"birthDate": "2016-03-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:31.538 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:31.538 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"097RAXEabFy3Q407"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13953/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:31.538 [print] {
"resourceType": "Patient",
"id": "13953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:36.173+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MANUEL <b>RODRIGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>104151</td></tr><tr><td>Date of birth</td><td><span>01 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VICENTE"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "104151"
}
],
"name": [
{
"use": "anonymous",
"text": "MANUEL RODRIGUEZ VICENTE",
"family": "RODRIGUEZ",
"given": [
"MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "retta74@hotmail.com"
},
{
"system": "phone",
"value": "34 (777) 989-5135"
}
],
"gender": "male",
"birthDate": "2016-03-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:31.538 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:31.538 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:31.538 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"097RAXEabFy3Q407"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13953/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:31.538 [print] {
"resourceType": "Patient",
"id": "13953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:36.173+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MANUEL <b>RODRIGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>104151</td></tr><tr><td>Date of birth</td><td><span>01 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VICENTE"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "104151"
}
],
"name": [
{
"use": "anonymous",
"text": "MANUEL RODRIGUEZ VICENTE",
"family": "RODRIGUEZ",
"given": [
"MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "retta74@hotmail.com"
},
{
"system": "phone",
"value": "34 (777) 989-5135"
}
],
"gender": "male",
"birthDate": "2016-03-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:31.538 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:32.147 [print] {
"resourceType": "Patient",
"id": "13953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:36.173+02:00",
"source": "#097RAXEabFy3Q407",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MANUEL <b>RODRIGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>104151</td></tr><tr><td>Date of birth</td><td><span>01 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VICENTE"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "104151"
}
],
"name": [
{
"use": "anonymous",
"text": "MANUEL RODRIGUEZ VICENTE",
"family": "RODRIGUEZ",
"given": [
"MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "retta74@hotmail.com"
},
{
"system": "phone",
"value": "34 (777) 989-5135"
}
],
"gender": "male",
"birthDate": "2016-03-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:32.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:33.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:37.463+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:37.463+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:33.395 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DELGADO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "58847"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ELENA DURAN DELGADO",
"family": "DURAN",
"given": [
"MARIA ELENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "agustina94@yahoo.com"
},
{
"system": "phone",
"value": "34 (287) 503-9255"
}
],
"gender": "female",
"birthDate": "2016-06-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:34.153 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:34.153 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vyLfToavN8u1lrSy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13954/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:34.153 [print] {
"resourceType": "Patient",
"id": "13954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:38.775+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ELENA <b>DURAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>58847</td></tr><tr><td>Date of birth</td><td><span>03 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DELGADO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "58847"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ELENA DURAN DELGADO",
"family": "DURAN",
"given": [
"MARIA ELENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "agustina94@yahoo.com"
},
{
"system": "phone",
"value": "34 (287) 503-9255"
}
],
"gender": "female",
"birthDate": "2016-06-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:34.153 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:34.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:34.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vyLfToavN8u1lrSy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13954/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:34.155 [print] {
"resourceType": "Patient",
"id": "13954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:38.775+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ELENA <b>DURAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>58847</td></tr><tr><td>Date of birth</td><td><span>03 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DELGADO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "58847"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ELENA DURAN DELGADO",
"family": "DURAN",
"given": [
"MARIA ELENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "agustina94@yahoo.com"
},
{
"system": "phone",
"value": "34 (287) 503-9255"
}
],
"gender": "female",
"birthDate": "2016-06-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:34.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:35.780 [print] {
"resourceType": "Patient",
"id": "13954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:38.775+02:00",
"source": "#vyLfToavN8u1lrSy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ELENA <b>DURAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>58847</td></tr><tr><td>Date of birth</td><td><span>03 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DELGADO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "58847"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ELENA DURAN DELGADO",
"family": "DURAN",
"given": [
"MARIA ELENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "agustina94@yahoo.com"
},
{
"system": "phone",
"value": "34 (287) 503-9255"
}
],
"gender": "female",
"birthDate": "2016-06-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:37.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:38.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:42.337+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:42.337+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:38.323 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTILLO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "129593"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEJANDRA CARMONA CASTILLO",
"family": "CARMONA",
"given": [
"ALEJANDRA"
]
}
],
"telecom": [
{
"system": "email",
"value": "simonis.herminia@bednar.com"
},
{
"system": "phone",
"value": "34 (504) 836-0287"
}
],
"gender": "female",
"birthDate": "2016-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:38.940 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"812"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:38.940 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TwEMOl4FNbIHZWhD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13955/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:38.941 [print] {
"resourceType": "Patient",
"id": "13955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:43.580+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEJANDRA <b>CARMONA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>129593</td></tr><tr><td>Date of birth</td><td><span>02 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTILLO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "129593"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEJANDRA CARMONA CASTILLO",
"family": "CARMONA",
"given": [
"ALEJANDRA"
]
}
],
"telecom": [
{
"system": "email",
"value": "simonis.herminia@bednar.com"
},
{
"system": "phone",
"value": "34 (504) 836-0287"
}
],
"gender": "female",
"birthDate": "2016-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:38.941 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:38.944 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"812"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:38.944 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TwEMOl4FNbIHZWhD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13955/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:38.944 [print] {
"resourceType": "Patient",
"id": "13955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:43.580+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEJANDRA <b>CARMONA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>129593</td></tr><tr><td>Date of birth</td><td><span>02 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTILLO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "129593"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEJANDRA CARMONA CASTILLO",
"family": "CARMONA",
"given": [
"ALEJANDRA"
]
}
],
"telecom": [
{
"system": "email",
"value": "simonis.herminia@bednar.com"
},
{
"system": "phone",
"value": "34 (504) 836-0287"
}
],
"gender": "female",
"birthDate": "2016-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:38.944 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:39.557 [print] {
"resourceType": "Patient",
"id": "13955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:43.580+02:00",
"source": "#TwEMOl4FNbIHZWhD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEJANDRA <b>CARMONA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>129593</td></tr><tr><td>Date of birth</td><td><span>02 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTILLO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "129593"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEJANDRA CARMONA CASTILLO",
"family": "CARMONA",
"given": [
"ALEJANDRA"
]
}
],
"telecom": [
{
"system": "email",
"value": "simonis.herminia@bednar.com"
},
{
"system": "phone",
"value": "34 (504) 836-0287"
}
],
"gender": "female",
"birthDate": "2016-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:40.357 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:41.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:45.008+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:45.008+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:41.254 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HIDALGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "1157"
}
],
"name": [
{
"use": "anonymous",
"text": "CLAUDIA GALLEGO HIDALGO",
"family": "GALLEGO",
"given": [
"CLAUDIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "wiegand.annamae@yahoo.com"
},
{
"system": "phone",
"value": "34 (567) 988-2565"
}
],
"gender": "female",
"birthDate": "2016-09-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:42.197 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:42.198 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vEtDh5UBfltWWZ8V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13956/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:42.198 [print] {
"resourceType": "Patient",
"id": "13956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:46.814+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CLAUDIA <b>GALLEGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>1157</td></tr><tr><td>Date of birth</td><td><span>08 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HIDALGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "1157"
}
],
"name": [
{
"use": "anonymous",
"text": "CLAUDIA GALLEGO HIDALGO",
"family": "GALLEGO",
"given": [
"CLAUDIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "wiegand.annamae@yahoo.com"
},
{
"system": "phone",
"value": "34 (567) 988-2565"
}
],
"gender": "female",
"birthDate": "2016-09-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:42.198 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:42.207 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:42.208 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vEtDh5UBfltWWZ8V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13956/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:42.209 [print] {
"resourceType": "Patient",
"id": "13956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:46.814+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CLAUDIA <b>GALLEGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>1157</td></tr><tr><td>Date of birth</td><td><span>08 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HIDALGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "1157"
}
],
"name": [
{
"use": "anonymous",
"text": "CLAUDIA GALLEGO HIDALGO",
"family": "GALLEGO",
"given": [
"CLAUDIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "wiegand.annamae@yahoo.com"
},
{
"system": "phone",
"value": "34 (567) 988-2565"
}
],
"gender": "female",
"birthDate": "2016-09-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:42.210 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:42.804 [print] {
"resourceType": "Patient",
"id": "13956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:46.814+02:00",
"source": "#vEtDh5UBfltWWZ8V",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CLAUDIA <b>GALLEGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>1157</td></tr><tr><td>Date of birth</td><td><span>08 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HIDALGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "1157"
}
],
"name": [
{
"use": "anonymous",
"text": "CLAUDIA GALLEGO HIDALGO",
"family": "GALLEGO",
"given": [
"CLAUDIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "wiegand.annamae@yahoo.com"
},
{
"system": "phone",
"value": "34 (567) 988-2565"
}
],
"gender": "female",
"birthDate": "2016-09-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:43.623 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:44.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:48.287+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:48.287+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:44.272 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GONZALEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164857"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA MERCEDES FUENTES GONZALEZ",
"family": "FUENTES",
"given": [
"MARIA MERCEDES"
]
}
],
"telecom": [
{
"system": "email",
"value": "rodriguez.kirstin@hotmail.com"
},
{
"system": "phone",
"value": "34 (649) 262-3975"
}
],
"gender": "female",
"birthDate": "2016-09-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:44.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"824"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:44.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oltZVsBfrnEdlOl2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13957/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:44.953 [print] {
"resourceType": "Patient",
"id": "13957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:49.587+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA MERCEDES <b>FUENTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164857</td></tr><tr><td>Date of birth</td><td><span>15 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GONZALEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164857"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA MERCEDES FUENTES GONZALEZ",
"family": "FUENTES",
"given": [
"MARIA MERCEDES"
]
}
],
"telecom": [
{
"system": "email",
"value": "rodriguez.kirstin@hotmail.com"
},
{
"system": "phone",
"value": "34 (649) 262-3975"
}
],
"gender": "female",
"birthDate": "2016-09-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:44.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:44.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"824"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:44.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oltZVsBfrnEdlOl2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13957/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:44.956 [print] {
"resourceType": "Patient",
"id": "13957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:49.587+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA MERCEDES <b>FUENTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164857</td></tr><tr><td>Date of birth</td><td><span>15 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GONZALEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164857"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA MERCEDES FUENTES GONZALEZ",
"family": "FUENTES",
"given": [
"MARIA MERCEDES"
]
}
],
"telecom": [
{
"system": "email",
"value": "rodriguez.kirstin@hotmail.com"
},
{
"system": "phone",
"value": "34 (649) 262-3975"
}
],
"gender": "female",
"birthDate": "2016-09-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:44.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:46.436 [print] {
"resourceType": "Patient",
"id": "13957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:49.587+02:00",
"source": "#oltZVsBfrnEdlOl2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA MERCEDES <b>FUENTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164857</td></tr><tr><td>Date of birth</td><td><span>15 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GONZALEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164857"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA MERCEDES FUENTES GONZALEZ",
"family": "FUENTES",
"given": [
"MARIA MERCEDES"
]
}
],
"telecom": [
{
"system": "email",
"value": "rodriguez.kirstin@hotmail.com"
},
{
"system": "phone",
"value": "34 (649) 262-3975"
}
],
"gender": "female",
"birthDate": "2016-09-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:48.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:48.723 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:52.740+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:52.740+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:48.738 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "59259"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGEL NAVARRO ROMAN",
"family": "NAVARRO",
"given": [
"ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "bethany67@yahoo.com"
},
{
"system": "phone",
"value": "34 (899) 736-9254"
}
],
"gender": "male",
"birthDate": "2016-09-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:49.386 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:49.386 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pbdcL3NHFbIZmvs3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13958/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:49.386 [print] {
"resourceType": "Patient",
"id": "13958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:54.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGEL <b>NAVARRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>59259</td></tr><tr><td>Date of birth</td><td><span>28 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "59259"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGEL NAVARRO ROMAN",
"family": "NAVARRO",
"given": [
"ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "bethany67@yahoo.com"
},
{
"system": "phone",
"value": "34 (899) 736-9254"
}
],
"gender": "male",
"birthDate": "2016-09-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:49.386 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:49.389 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:49.389 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pbdcL3NHFbIZmvs3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13958/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:49.389 [print] {
"resourceType": "Patient",
"id": "13958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:54.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGEL <b>NAVARRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>59259</td></tr><tr><td>Date of birth</td><td><span>28 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "59259"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGEL NAVARRO ROMAN",
"family": "NAVARRO",
"given": [
"ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "bethany67@yahoo.com"
},
{
"system": "phone",
"value": "34 (899) 736-9254"
}
],
"gender": "male",
"birthDate": "2016-09-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:49.389 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:50.015 [print] {
"resourceType": "Patient",
"id": "13958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:54.010+02:00",
"source": "#pbdcL3NHFbIZmvs3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGEL <b>NAVARRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>59259</td></tr><tr><td>Date of birth</td><td><span>28 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "59259"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGEL NAVARRO ROMAN",
"family": "NAVARRO",
"given": [
"ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "bethany67@yahoo.com"
},
{
"system": "phone",
"value": "34 (899) 736-9254"
}
],
"gender": "male",
"birthDate": "2016-09-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:50.634 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:51.289 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:55.290+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:55.290+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:51.305 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "51292"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO JAVIER MARTIN ",
"family": "MARTIN",
"given": [
"FRANCISCO JAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "ykertzmann@yahoo.com"
},
{
"system": "phone",
"value": "34 (595) 628-6931"
}
],
"gender": "male",
"birthDate": "2016-12-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:51.974 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"686"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:51.974 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ufvkGVoxNHb2EVKZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13959/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:51.974 [print] {
"resourceType": "Patient",
"id": "13959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:56.612+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO JAVIER <b>MARTIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>51292</td></tr><tr><td>Date of birth</td><td><span>30 December 2016</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "51292"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO JAVIER MARTIN ",
"family": "MARTIN",
"given": [
"FRANCISCO JAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "ykertzmann@yahoo.com"
},
{
"system": "phone",
"value": "34 (595) 628-6931"
}
],
"gender": "male",
"birthDate": "2016-12-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:51.974 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:51.977 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"686"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:51.977 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ufvkGVoxNHb2EVKZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13959/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:51.977 [print] {
"resourceType": "Patient",
"id": "13959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:56.612+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO JAVIER <b>MARTIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>51292</td></tr><tr><td>Date of birth</td><td><span>30 December 2016</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "51292"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO JAVIER MARTIN ",
"family": "MARTIN",
"given": [
"FRANCISCO JAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "ykertzmann@yahoo.com"
},
{
"system": "phone",
"value": "34 (595) 628-6931"
}
],
"gender": "male",
"birthDate": "2016-12-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:51.977 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:34:52.864 [print] {
"resourceType": "Patient",
"id": "13959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:56.612+02:00",
"source": "#ufvkGVoxNHb2EVKZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO JAVIER <b>MARTIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>51292</td></tr><tr><td>Date of birth</td><td><span>30 December 2016</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "51292"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO JAVIER MARTIN ",
"family": "MARTIN",
"given": [
"FRANCISCO JAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "ykertzmann@yahoo.com"
},
{
"system": "phone",
"value": "34 (595) 628-6931"
}
],
"gender": "male",
"birthDate": "2016-12-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:34:53.619 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:34:54.640 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:34:58.281+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:34:58.281+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:34:54.640 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CAMPOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "95136"
}
],
"name": [
{
"use": "anonymous",
"text": "CATALINA CRESPO CAMPOS",
"family": "CRESPO",
"given": [
"CATALINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "vesta.smitham@rempel.com"
},
{
"system": "phone",
"value": "34 (261) 377-5717"
}
],
"gender": "female",
"birthDate": "2017-04-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:55.275 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:55.275 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"knrAZOsG1VKbGjfh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13960/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:55.275 [print] {
"resourceType": "Patient",
"id": "13960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:59.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CATALINA <b>CRESPO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>95136</td></tr><tr><td>Date of birth</td><td><span>12 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CAMPOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "95136"
}
],
"name": [
{
"use": "anonymous",
"text": "CATALINA CRESPO CAMPOS",
"family": "CRESPO",
"given": [
"CATALINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "vesta.smitham@rempel.com"
},
{
"system": "phone",
"value": "34 (261) 377-5717"
}
],
"gender": "female",
"birthDate": "2017-04-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:55.275 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:34:55.275 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:34:55.275 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"knrAZOsG1VKbGjfh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13960/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:34:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:34:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:34:55.275 [print] {
"resourceType": "Patient",
"id": "13960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:59.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CATALINA <b>CRESPO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>95136</td></tr><tr><td>Date of birth</td><td><span>12 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CAMPOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "95136"
}
],
"name": [
{
"use": "anonymous",
"text": "CATALINA CRESPO CAMPOS",
"family": "CRESPO",
"given": [
"CATALINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "vesta.smitham@rempel.com"
},
{
"system": "phone",
"value": "34 (261) 377-5717"
}
],
"gender": "female",
"birthDate": "2017-04-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:34:55.275 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:04.236 [print] {
"resourceType": "Patient",
"id": "13960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:34:59.907+02:00",
"source": "#knrAZOsG1VKbGjfh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CATALINA <b>CRESPO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>95136</td></tr><tr><td>Date of birth</td><td><span>12 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CAMPOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "95136"
}
],
"name": [
{
"use": "anonymous",
"text": "CATALINA CRESPO CAMPOS",
"family": "CRESPO",
"given": [
"CATALINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "vesta.smitham@rempel.com"
},
{
"system": "phone",
"value": "34 (261) 377-5717"
}
],
"gender": "female",
"birthDate": "2017-04-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:04.890 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:05.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:09.555+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:09.555+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:05.526 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BRAVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "56920"
}
],
"name": [
{
"use": "anonymous",
"text": "FELIPE PARRA BRAVO",
"family": "PARRA",
"given": [
"FELIPE"
]
}
],
"telecom": [
{
"system": "email",
"value": "octavia63@west.org"
},
{
"system": "phone",
"value": "34 (481) 759-6580"
}
],
"gender": "male",
"birthDate": "2017-05-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:06.148 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:06.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MrKEzKgZGQdmfzZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13961/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:06.148 [print] {
"resourceType": "Patient",
"id": "13961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:10.770+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FELIPE <b>PARRA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>56920</td></tr><tr><td>Date of birth</td><td><span>31 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BRAVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "56920"
}
],
"name": [
{
"use": "anonymous",
"text": "FELIPE PARRA BRAVO",
"family": "PARRA",
"given": [
"FELIPE"
]
}
],
"telecom": [
{
"system": "email",
"value": "octavia63@west.org"
},
{
"system": "phone",
"value": "34 (481) 759-6580"
}
],
"gender": "male",
"birthDate": "2017-05-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:06.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:06.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:06.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MrKEzKgZGQdmfzZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13961/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:06.151 [print] {
"resourceType": "Patient",
"id": "13961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:10.770+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FELIPE <b>PARRA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>56920</td></tr><tr><td>Date of birth</td><td><span>31 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BRAVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "56920"
}
],
"name": [
{
"use": "anonymous",
"text": "FELIPE PARRA BRAVO",
"family": "PARRA",
"given": [
"FELIPE"
]
}
],
"telecom": [
{
"system": "email",
"value": "octavia63@west.org"
},
{
"system": "phone",
"value": "34 (481) 759-6580"
}
],
"gender": "male",
"birthDate": "2017-05-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:06.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:06.775 [print] {
"resourceType": "Patient",
"id": "13961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:10.770+02:00",
"source": "#MrKEzKgZGQdmfzZI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FELIPE <b>PARRA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>56920</td></tr><tr><td>Date of birth</td><td><span>31 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BRAVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "56920"
}
],
"name": [
{
"use": "anonymous",
"text": "FELIPE PARRA BRAVO",
"family": "PARRA",
"given": [
"FELIPE"
]
}
],
"telecom": [
{
"system": "email",
"value": "octavia63@west.org"
},
{
"system": "phone",
"value": "34 (481) 759-6580"
}
],
"gender": "male",
"birthDate": "2017-05-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:07.724 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:14.949 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:12.362+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:12.362+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:14.951 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "116360"
}
],
"name": [
{
"use": "anonymous",
"text": "MARINA CRUZ MARIN",
"family": "CRUZ",
"given": [
"MARINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "norma71@hotmail.com"
},
{
"system": "phone",
"value": "34 (510) 256-3320"
}
],
"gender": "female",
"birthDate": "2017-10-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:16.609 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:16.609 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KrPbhTqATyR4WQGW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13962/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:16.609 [print] {
"resourceType": "Patient",
"id": "13962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:21.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARINA <b>CRUZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>116360</td></tr><tr><td>Date of birth</td><td><span>30 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "116360"
}
],
"name": [
{
"use": "anonymous",
"text": "MARINA CRUZ MARIN",
"family": "CRUZ",
"given": [
"MARINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "norma71@hotmail.com"
},
{
"system": "phone",
"value": "34 (510) 256-3320"
}
],
"gender": "female",
"birthDate": "2017-10-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:16.609 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:16.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:16.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KrPbhTqATyR4WQGW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13962/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:16.612 [print] {
"resourceType": "Patient",
"id": "13962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:21.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARINA <b>CRUZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>116360</td></tr><tr><td>Date of birth</td><td><span>30 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "116360"
}
],
"name": [
{
"use": "anonymous",
"text": "MARINA CRUZ MARIN",
"family": "CRUZ",
"given": [
"MARINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "norma71@hotmail.com"
},
{
"system": "phone",
"value": "34 (510) 256-3320"
}
],
"gender": "female",
"birthDate": "2017-10-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:16.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:17.186 [print] {
"resourceType": "Patient",
"id": "13962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:21.227+02:00",
"source": "#KrPbhTqATyR4WQGW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARINA <b>CRUZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>116360</td></tr><tr><td>Date of birth</td><td><span>30 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "116360"
}
],
"name": [
{
"use": "anonymous",
"text": "MARINA CRUZ MARIN",
"family": "CRUZ",
"given": [
"MARINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "norma71@hotmail.com"
},
{
"system": "phone",
"value": "34 (510) 256-3320"
}
],
"gender": "female",
"birthDate": "2017-10-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:18.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:18.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:22.836+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:22.836+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:18.859 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "169975"
}
],
"name": [
{
"use": "anonymous",
"text": "JESUS RUIZ SANTOS",
"family": "RUIZ",
"given": [
"JESUS"
]
}
],
"telecom": [
{
"system": "email",
"value": "beatty.melyssa@jerde.com"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:20.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"717"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:20.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DD0PIGyYPazRj0uo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13963/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:20.472 [print] {
"resourceType": "Patient",
"id": "13963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:25.114+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JESUS <b>RUIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>169975</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "169975"
}
],
"name": [
{
"use": "anonymous",
"text": "JESUS RUIZ SANTOS",
"family": "RUIZ",
"given": [
"JESUS"
]
}
],
"telecom": [
{
"system": "email",
"value": "beatty.melyssa@jerde.com"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:20.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:20.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"717"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:20.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DD0PIGyYPazRj0uo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13963/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:20.472 [print] {
"resourceType": "Patient",
"id": "13963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:25.114+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JESUS <b>RUIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>169975</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "169975"
}
],
"name": [
{
"use": "anonymous",
"text": "JESUS RUIZ SANTOS",
"family": "RUIZ",
"given": [
"JESUS"
]
}
],
"telecom": [
{
"system": "email",
"value": "beatty.melyssa@jerde.com"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:20.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:21.122 [print] {
"resourceType": "Patient",
"id": "13963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:25.114+02:00",
"source": "#DD0PIGyYPazRj0uo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JESUS <b>RUIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>169975</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "169975"
}
],
"name": [
{
"use": "anonymous",
"text": "JESUS RUIZ SANTOS",
"family": "RUIZ",
"given": [
"JESUS"
]
}
],
"telecom": [
{
"system": "email",
"value": "beatty.melyssa@jerde.com"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:21.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:22.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:26.422+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:26.422+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:22.385 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MEDINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "57199"
}
],
"name": [
{
"use": "anonymous",
"text": "EDUARDO GUERRERO MEDINA",
"family": "GUERRERO",
"given": [
"EDUARDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "columbus.farrell@thompson.com"
},
{
"system": "phone",
"value": "34 (626) 959-5562"
}
],
"gender": "male",
"birthDate": "2012-12-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:22.993 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"805"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:22.993 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"autzImUB79hC4wUR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13964/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:22.993 [print] {
"resourceType": "Patient",
"id": "13964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:27.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EDUARDO <b>GUERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>57199</td></tr><tr><td>Date of birth</td><td><span>24 December 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MEDINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "57199"
}
],
"name": [
{
"use": "anonymous",
"text": "EDUARDO GUERRERO MEDINA",
"family": "GUERRERO",
"given": [
"EDUARDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "columbus.farrell@thompson.com"
},
{
"system": "phone",
"value": "34 (626) 959-5562"
}
],
"gender": "male",
"birthDate": "2012-12-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:22.993 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:22.996 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"805"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:22.996 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"autzImUB79hC4wUR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13964/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:22.996 [print] {
"resourceType": "Patient",
"id": "13964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:27.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EDUARDO <b>GUERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>57199</td></tr><tr><td>Date of birth</td><td><span>24 December 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MEDINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "57199"
}
],
"name": [
{
"use": "anonymous",
"text": "EDUARDO GUERRERO MEDINA",
"family": "GUERRERO",
"given": [
"EDUARDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "columbus.farrell@thompson.com"
},
{
"system": "phone",
"value": "34 (626) 959-5562"
}
],
"gender": "male",
"birthDate": "2012-12-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:22.996 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:23.589 [print] {
"resourceType": "Patient",
"id": "13964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:27.635+02:00",
"source": "#autzImUB79hC4wUR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EDUARDO <b>GUERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>57199</td></tr><tr><td>Date of birth</td><td><span>24 December 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MEDINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "57199"
}
],
"name": [
{
"use": "anonymous",
"text": "EDUARDO GUERRERO MEDINA",
"family": "GUERRERO",
"given": [
"EDUARDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "columbus.farrell@thompson.com"
},
{
"system": "phone",
"value": "34 (626) 959-5562"
}
],
"gender": "male",
"birthDate": "2012-12-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:24.264 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:24.986 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:28.909+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:28.909+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:24.986 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ARIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "156886"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE FRANCISCO BRAVO ARIAS",
"family": "BRAVO",
"given": [
"JOSE FRANCISCO"
]
}
],
"telecom": [
{
"system": "email",
"value": "wschmidt@hotmail.com"
},
{
"system": "phone",
"value": "34 (940) 545-3348"
}
],
"gender": "male",
"birthDate": "2013-02-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:25.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:25.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ILQ1czVAf4Ne1Nvg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13965/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:25.623 [print] {
"resourceType": "Patient",
"id": "13965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:30.254+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE FRANCISCO <b>BRAVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>156886</td></tr><tr><td>Date of birth</td><td><span>12 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ARIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "156886"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE FRANCISCO BRAVO ARIAS",
"family": "BRAVO",
"given": [
"JOSE FRANCISCO"
]
}
],
"telecom": [
{
"system": "email",
"value": "wschmidt@hotmail.com"
},
{
"system": "phone",
"value": "34 (940) 545-3348"
}
],
"gender": "male",
"birthDate": "2013-02-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:25.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:25.625 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:25.625 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ILQ1czVAf4Ne1Nvg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13965/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:25.625 [print] {
"resourceType": "Patient",
"id": "13965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:30.254+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE FRANCISCO <b>BRAVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>156886</td></tr><tr><td>Date of birth</td><td><span>12 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ARIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "156886"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE FRANCISCO BRAVO ARIAS",
"family": "BRAVO",
"given": [
"JOSE FRANCISCO"
]
}
],
"telecom": [
{
"system": "email",
"value": "wschmidt@hotmail.com"
},
{
"system": "phone",
"value": "34 (940) 545-3348"
}
],
"gender": "male",
"birthDate": "2013-02-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:25.625 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:26.229 [print] {
"resourceType": "Patient",
"id": "13965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:30.254+02:00",
"source": "#ILQ1czVAf4Ne1Nvg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE FRANCISCO <b>BRAVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>156886</td></tr><tr><td>Date of birth</td><td><span>12 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ARIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "156886"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE FRANCISCO BRAVO ARIAS",
"family": "BRAVO",
"given": [
"JOSE FRANCISCO"
]
}
],
"telecom": [
{
"system": "email",
"value": "wschmidt@hotmail.com"
},
{
"system": "phone",
"value": "34 (940) 545-3348"
}
],
"gender": "male",
"birthDate": "2013-02-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:26.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:27.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:31.547+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:31.547+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:27.556 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "80385"
}
],
"name": [
{
"use": "anonymous",
"text": "LUIS RAMIREZ RAMOS",
"family": "RAMIREZ",
"given": [
"LUIS"
]
}
],
"telecom": [
],
"gender": "male",
"birthDate": "2013-03-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:28.158 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:28.158 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Nquu5tD9HMIeUDSO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13966/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:28.158 [print] {
"resourceType": "Patient",
"id": "13966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:32.801+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUIS <b>RAMIREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>80385</td></tr><tr><td>Date of birth</td><td><span>11 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "80385"
}
],
"name": [
{
"use": "anonymous",
"text": "LUIS RAMIREZ RAMOS",
"family": "RAMIREZ",
"given": [
"LUIS"
]
}
],
"gender": "male",
"birthDate": "2013-03-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:28.158 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:28.160 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:28.160 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Nquu5tD9HMIeUDSO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13966/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:28.160 [print] {
"resourceType": "Patient",
"id": "13966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:32.801+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUIS <b>RAMIREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>80385</td></tr><tr><td>Date of birth</td><td><span>11 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "80385"
}
],
"name": [
{
"use": "anonymous",
"text": "LUIS RAMIREZ RAMOS",
"family": "RAMIREZ",
"given": [
"LUIS"
]
}
],
"gender": "male",
"birthDate": "2013-03-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:28.160 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:29.166 [print] {
"resourceType": "Patient",
"id": "13966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:32.801+02:00",
"source": "#Nquu5tD9HMIeUDSO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUIS <b>RAMIREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>80385</td></tr><tr><td>Date of birth</td><td><span>11 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "80385"
}
],
"name": [
{
"use": "anonymous",
"text": "LUIS RAMIREZ RAMOS",
"family": "RAMIREZ",
"given": [
"LUIS"
]
}
],
"gender": "male",
"birthDate": "2013-03-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:29.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:30.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:34.441+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:34.441+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:30.403 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "146392"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSEFA SANCHEZ ",
"family": "SANCHEZ",
"given": [
"JOSEFA"
]
}
],
"telecom": [
{
"system": "email",
"value": "murray.desmond@cummerata.com"
},
{
"system": "phone",
"value": "34 (923) 933-6223"
}
],
"gender": "female",
"birthDate": "2013-05-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:31.004 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"679"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:31.004 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"odTSSbqMJS9D3tca"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13967/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:31.004 [print] {
"resourceType": "Patient",
"id": "13967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:35.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSEFA <b>SANCHEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>146392</td></tr><tr><td>Date of birth</td><td><span>03 May 2013</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "146392"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSEFA SANCHEZ ",
"family": "SANCHEZ",
"given": [
"JOSEFA"
]
}
],
"telecom": [
{
"system": "email",
"value": "murray.desmond@cummerata.com"
},
{
"system": "phone",
"value": "34 (923) 933-6223"
}
],
"gender": "female",
"birthDate": "2013-05-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:31.004 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:31.004 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"679"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:31.004 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"odTSSbqMJS9D3tca"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13967/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:31.004 [print] {
"resourceType": "Patient",
"id": "13967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:35.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSEFA <b>SANCHEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>146392</td></tr><tr><td>Date of birth</td><td><span>03 May 2013</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "146392"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSEFA SANCHEZ ",
"family": "SANCHEZ",
"given": [
"JOSEFA"
]
}
],
"telecom": [
{
"system": "email",
"value": "murray.desmond@cummerata.com"
},
{
"system": "phone",
"value": "34 (923) 933-6223"
}
],
"gender": "female",
"birthDate": "2013-05-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:31.004 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:32.664 [print] {
"resourceType": "Patient",
"id": "13967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:35.647+02:00",
"source": "#odTSSbqMJS9D3tca",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSEFA <b>SANCHEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>146392</td></tr><tr><td>Date of birth</td><td><span>03 May 2013</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "146392"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSEFA SANCHEZ ",
"family": "SANCHEZ",
"given": [
"JOSEFA"
]
}
],
"telecom": [
{
"system": "email",
"value": "murray.desmond@cummerata.com"
},
{
"system": "phone",
"value": "34 (923) 933-6223"
}
],
"gender": "female",
"birthDate": "2013-05-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:34.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:34.932 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:38.948+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:38.948+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:34.934 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "8107"
}
],
"name": [
{
"use": "anonymous",
"text": "CARLA CAMPOS HERNANDEZ",
"family": "CAMPOS",
"given": [
"CARLA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ari36@gmail.com"
},
{
"system": "phone",
"value": "34 (871) 875-8903"
}
],
"gender": "female",
"birthDate": "2013-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:35.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:35.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AAoFuYZrL6adB2Uv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13968/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:35.554 [print] {
"resourceType": "Patient",
"id": "13968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:40.206+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARLA <b>CAMPOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>8107</td></tr><tr><td>Date of birth</td><td><span>05 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "8107"
}
],
"name": [
{
"use": "anonymous",
"text": "CARLA CAMPOS HERNANDEZ",
"family": "CAMPOS",
"given": [
"CARLA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ari36@gmail.com"
},
{
"system": "phone",
"value": "34 (871) 875-8903"
}
],
"gender": "female",
"birthDate": "2013-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:35.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:35.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:35.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AAoFuYZrL6adB2Uv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13968/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:35.569 [print] {
"resourceType": "Patient",
"id": "13968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:40.206+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARLA <b>CAMPOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>8107</td></tr><tr><td>Date of birth</td><td><span>05 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "8107"
}
],
"name": [
{
"use": "anonymous",
"text": "CARLA CAMPOS HERNANDEZ",
"family": "CAMPOS",
"given": [
"CARLA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ari36@gmail.com"
},
{
"system": "phone",
"value": "34 (871) 875-8903"
}
],
"gender": "female",
"birthDate": "2013-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:35.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:36.255 [print] {
"resourceType": "Patient",
"id": "13968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:40.206+02:00",
"source": "#AAoFuYZrL6adB2Uv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARLA <b>CAMPOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>8107</td></tr><tr><td>Date of birth</td><td><span>05 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "8107"
}
],
"name": [
{
"use": "anonymous",
"text": "CARLA CAMPOS HERNANDEZ",
"family": "CAMPOS",
"given": [
"CARLA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ari36@gmail.com"
},
{
"system": "phone",
"value": "34 (871) 875-8903"
}
],
"gender": "female",
"birthDate": "2013-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:36.909 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:37.500 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:41.554+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:41.554+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:37.502 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MENDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "193382"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTOR SANTOS MENDEZ",
"family": "SANTOS",
"given": [
"VICTOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "eferry@gusikowski.com"
},
{
"system": "phone",
"value": "34 (912) 246-3986"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:38.163 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"767"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:38.163 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oWGwTkkLnktytFkY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13969/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:38.163 [print] {
"resourceType": "Patient",
"id": "13969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:42.799+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTOR <b>SANTOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>193382</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MENDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "193382"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTOR SANTOS MENDEZ",
"family": "SANTOS",
"given": [
"VICTOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "eferry@gusikowski.com"
},
{
"system": "phone",
"value": "34 (912) 246-3986"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:38.163 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:38.165 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"767"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:38.165 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oWGwTkkLnktytFkY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13969/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:38.165 [print] {
"resourceType": "Patient",
"id": "13969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:42.799+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTOR <b>SANTOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>193382</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MENDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "193382"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTOR SANTOS MENDEZ",
"family": "SANTOS",
"given": [
"VICTOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "eferry@gusikowski.com"
},
{
"system": "phone",
"value": "34 (912) 246-3986"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:38.165 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:38.788 [print] {
"resourceType": "Patient",
"id": "13969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:42.799+02:00",
"source": "#oWGwTkkLnktytFkY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTOR <b>SANTOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>193382</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MENDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "193382"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTOR SANTOS MENDEZ",
"family": "SANTOS",
"given": [
"VICTOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "eferry@gusikowski.com"
},
{
"system": "phone",
"value": "34 (912) 246-3986"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:39.426 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:40.985 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:44.079+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:44.079+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:41.001 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DURAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "138827"
}
],
"name": [
{
"use": "anonymous",
"text": "MIRIAM HIDALGO DURAN",
"family": "HIDALGO",
"given": [
"MIRIAM"
]
}
],
"telecom": [
{
"system": "email",
"value": "stoltenberg.davonte@rutherford.com"
},
{
"system": "phone",
"value": "34 (726) 900-9780"
}
],
"gender": "female",
"birthDate": "2013-12-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:41.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"807"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:41.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SxfSlhfZopLCrxbH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13970/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:41.604 [print] {
"resourceType": "Patient",
"id": "13970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:46.240+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIRIAM <b>HIDALGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>138827</td></tr><tr><td>Date of birth</td><td><span>26 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DURAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "138827"
}
],
"name": [
{
"use": "anonymous",
"text": "MIRIAM HIDALGO DURAN",
"family": "HIDALGO",
"given": [
"MIRIAM"
]
}
],
"telecom": [
{
"system": "email",
"value": "stoltenberg.davonte@rutherford.com"
},
{
"system": "phone",
"value": "34 (726) 900-9780"
}
],
"gender": "female",
"birthDate": "2013-12-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:41.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:41.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"807"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:41.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SxfSlhfZopLCrxbH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13970/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:41.604 [print] {
"resourceType": "Patient",
"id": "13970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:46.240+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIRIAM <b>HIDALGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>138827</td></tr><tr><td>Date of birth</td><td><span>26 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DURAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "138827"
}
],
"name": [
{
"use": "anonymous",
"text": "MIRIAM HIDALGO DURAN",
"family": "HIDALGO",
"given": [
"MIRIAM"
]
}
],
"telecom": [
{
"system": "email",
"value": "stoltenberg.davonte@rutherford.com"
},
{
"system": "phone",
"value": "34 (726) 900-9780"
}
],
"gender": "female",
"birthDate": "2013-12-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:41.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:42.180 [print] {
"resourceType": "Patient",
"id": "13970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:46.240+02:00",
"source": "#SxfSlhfZopLCrxbH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIRIAM <b>HIDALGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>138827</td></tr><tr><td>Date of birth</td><td><span>26 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DURAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "138827"
}
],
"name": [
{
"use": "anonymous",
"text": "MIRIAM HIDALGO DURAN",
"family": "HIDALGO",
"given": [
"MIRIAM"
]
}
],
"telecom": [
{
"system": "email",
"value": "stoltenberg.davonte@rutherford.com"
},
{
"system": "phone",
"value": "34 (726) 900-9780"
}
],
"gender": "female",
"birthDate": "2013-12-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:42.822 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:43.651 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:47.468+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:47.468+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:43.653 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GOMEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "144725"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA ISABEL CARRASCO GOMEZ",
"family": "CARRASCO",
"given": [
"ANA ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "nkerluke@connelly.org"
},
{
"system": "phone",
"value": "34 (456) 231-7821"
}
],
"gender": "female",
"birthDate": "2014-01-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:44.298 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:44.298 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3CJOFWwDmTbW1c8T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13971/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:44.298 [print] {
"resourceType": "Patient",
"id": "13971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:48.935+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA ISABEL <b>CARRASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>144725</td></tr><tr><td>Date of birth</td><td><span>22 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GOMEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "144725"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA ISABEL CARRASCO GOMEZ",
"family": "CARRASCO",
"given": [
"ANA ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "nkerluke@connelly.org"
},
{
"system": "phone",
"value": "34 (456) 231-7821"
}
],
"gender": "female",
"birthDate": "2014-01-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:44.298 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:44.301 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:44.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3CJOFWwDmTbW1c8T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13971/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:44.306 [print] {
"resourceType": "Patient",
"id": "13971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:48.935+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA ISABEL <b>CARRASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>144725</td></tr><tr><td>Date of birth</td><td><span>22 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GOMEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "144725"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA ISABEL CARRASCO GOMEZ",
"family": "CARRASCO",
"given": [
"ANA ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "nkerluke@connelly.org"
},
{
"system": "phone",
"value": "34 (456) 231-7821"
}
],
"gender": "female",
"birthDate": "2014-01-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:44.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:44.903 [print] {
"resourceType": "Patient",
"id": "13971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:48.935+02:00",
"source": "#3CJOFWwDmTbW1c8T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA ISABEL <b>CARRASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>144725</td></tr><tr><td>Date of birth</td><td><span>22 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GOMEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "144725"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA ISABEL CARRASCO GOMEZ",
"family": "CARRASCO",
"given": [
"ANA ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "nkerluke@connelly.org"
},
{
"system": "phone",
"value": "34 (456) 231-7821"
}
],
"gender": "female",
"birthDate": "2014-01-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:45.561 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:46.201 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:50.230+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:50.230+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:46.204 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IGLESIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "135556"
}
],
"name": [
{
"use": "anonymous",
"text": "SALVADOR MARQUEZ IGLESIAS",
"family": "MARQUEZ",
"given": [
"SALVADOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "wlarkin@grady.com"
},
{
"system": "phone",
"value": "34 (816) 267-2548"
}
],
"gender": "male",
"birthDate": "2014-03-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:46.881 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:46.881 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tjzTpVXjHuBvw7Fa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13972/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:46.881 [print] {
"resourceType": "Patient",
"id": "13972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:51.515+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SALVADOR <b>MARQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>135556</td></tr><tr><td>Date of birth</td><td><span>18 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IGLESIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "135556"
}
],
"name": [
{
"use": "anonymous",
"text": "SALVADOR MARQUEZ IGLESIAS",
"family": "MARQUEZ",
"given": [
"SALVADOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "wlarkin@grady.com"
},
{
"system": "phone",
"value": "34 (816) 267-2548"
}
],
"gender": "male",
"birthDate": "2014-03-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:46.881 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:46.883 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:46.883 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tjzTpVXjHuBvw7Fa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13972/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:46.884 [print] {
"resourceType": "Patient",
"id": "13972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:51.515+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SALVADOR <b>MARQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>135556</td></tr><tr><td>Date of birth</td><td><span>18 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IGLESIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "135556"
}
],
"name": [
{
"use": "anonymous",
"text": "SALVADOR MARQUEZ IGLESIAS",
"family": "MARQUEZ",
"given": [
"SALVADOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "wlarkin@grady.com"
},
{
"system": "phone",
"value": "34 (816) 267-2548"
}
],
"gender": "male",
"birthDate": "2014-03-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:46.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:47.572 [print] {
"resourceType": "Patient",
"id": "13972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:51.515+02:00",
"source": "#tjzTpVXjHuBvw7Fa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SALVADOR <b>MARQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>135556</td></tr><tr><td>Date of birth</td><td><span>18 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IGLESIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "135556"
}
],
"name": [
{
"use": "anonymous",
"text": "SALVADOR MARQUEZ IGLESIAS",
"family": "MARQUEZ",
"given": [
"SALVADOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "wlarkin@grady.com"
},
{
"system": "phone",
"value": "34 (816) 267-2548"
}
],
"gender": "male",
"birthDate": "2014-03-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:48.520 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:49.388 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:53.185+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:53.185+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:49.388 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASCUAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "154194"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN JOSE SUAREZ PASCUAL",
"family": "SUAREZ",
"given": [
"JUAN JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "wehner.keon@schamberger.com"
},
{
"system": "phone",
"value": "34 (557) 318-3919"
}
],
"gender": "male",
"birthDate": "2014-04-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:50.067 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:50.067 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2SJdbp16KYVzxXYf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13973/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:50.067 [print] {
"resourceType": "Patient",
"id": "13973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:54.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN JOSE <b>SUAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>154194</td></tr><tr><td>Date of birth</td><td><span>10 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASCUAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "154194"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN JOSE SUAREZ PASCUAL",
"family": "SUAREZ",
"given": [
"JUAN JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "wehner.keon@schamberger.com"
},
{
"system": "phone",
"value": "34 (557) 318-3919"
}
],
"gender": "male",
"birthDate": "2014-04-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:50.067 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:50.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:50.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2SJdbp16KYVzxXYf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13973/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:35:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:35:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:50.071 [print] {
"resourceType": "Patient",
"id": "13973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:54.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN JOSE <b>SUAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>154194</td></tr><tr><td>Date of birth</td><td><span>10 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASCUAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "154194"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN JOSE SUAREZ PASCUAL",
"family": "SUAREZ",
"given": [
"JUAN JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "wehner.keon@schamberger.com"
},
{
"system": "phone",
"value": "34 (557) 318-3919"
}
],
"gender": "male",
"birthDate": "2014-04-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:50.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:54.007 [print] {
"resourceType": "Patient",
"id": "13973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:35:54.700+02:00",
"source": "#2SJdbp16KYVzxXYf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN JOSE <b>SUAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>154194</td></tr><tr><td>Date of birth</td><td><span>10 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASCUAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "154194"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN JOSE SUAREZ PASCUAL",
"family": "SUAREZ",
"given": [
"JUAN JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "wehner.keon@schamberger.com"
},
{
"system": "phone",
"value": "34 (557) 318-3919"
}
],
"gender": "male",
"birthDate": "2014-04-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:54.899 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:55.858 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:35:59.556+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:35:59.556+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:55.858 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SOLER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106417"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA TERESA MARTIN SOLER",
"family": "MARTIN",
"given": [
"MARIA TERESA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kessler.hayley@hotmail.com"
},
{
"system": "phone",
"value": "34 (494) 726-8117"
}
],
"gender": "female",
"birthDate": "2014-05-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:56.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:56.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BNbOWOYZuB5JkVQz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13974/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:56.472 [print] {
"resourceType": "Patient",
"id": "13974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:01.106+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA TERESA <b>MARTIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106417</td></tr><tr><td>Date of birth</td><td><span>30 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SOLER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106417"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA TERESA MARTIN SOLER",
"family": "MARTIN",
"given": [
"MARIA TERESA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kessler.hayley@hotmail.com"
},
{
"system": "phone",
"value": "34 (494) 726-8117"
}
],
"gender": "female",
"birthDate": "2014-05-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:56.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:56.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:56.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BNbOWOYZuB5JkVQz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13974/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:56.472 [print] {
"resourceType": "Patient",
"id": "13974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:01.106+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA TERESA <b>MARTIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106417</td></tr><tr><td>Date of birth</td><td><span>30 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SOLER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106417"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA TERESA MARTIN SOLER",
"family": "MARTIN",
"given": [
"MARIA TERESA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kessler.hayley@hotmail.com"
},
{
"system": "phone",
"value": "34 (494) 726-8117"
}
],
"gender": "female",
"birthDate": "2014-05-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:56.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:57.038 [print] {
"resourceType": "Patient",
"id": "13974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:01.106+02:00",
"source": "#BNbOWOYZuB5JkVQz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA TERESA <b>MARTIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106417</td></tr><tr><td>Date of birth</td><td><span>30 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SOLER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106417"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA TERESA MARTIN SOLER",
"family": "MARTIN",
"given": [
"MARIA TERESA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kessler.hayley@hotmail.com"
},
{
"system": "phone",
"value": "34 (494) 726-8117"
}
],
"gender": "female",
"birthDate": "2014-05-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:35:57.654 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:35:58.241 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:02.311+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:02.311+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:35:58.241 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "31416"
}
],
"name": [
{
"use": "anonymous",
"text": "PEDRO ALONSO ROMERO",
"family": "ALONSO",
"given": [
"PEDRO"
]
}
],
"telecom": [
{
"system": "email",
"value": "sanford.lolita@gmail.com"
}
],
"gender": "male",
"birthDate": "2014-11-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:58.959 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"745"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:58.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IJm8yL8J6WalmNEr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13975/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:58.959 [print] {
"resourceType": "Patient",
"id": "13975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:03.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PEDRO <b>ALONSO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>31416</td></tr><tr><td>Date of birth</td><td><span>28 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "31416"
}
],
"name": [
{
"use": "anonymous",
"text": "PEDRO ALONSO ROMERO",
"family": "ALONSO",
"given": [
"PEDRO"
]
}
],
"telecom": [
{
"system": "email",
"value": "sanford.lolita@gmail.com"
}
],
"gender": "male",
"birthDate": "2014-11-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:58.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:35:58.962 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"745"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:35:58.962 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IJm8yL8J6WalmNEr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13975/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:35:58.962 [print] {
"resourceType": "Patient",
"id": "13975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:03.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PEDRO <b>ALONSO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>31416</td></tr><tr><td>Date of birth</td><td><span>28 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "31416"
}
],
"name": [
{
"use": "anonymous",
"text": "PEDRO ALONSO ROMERO",
"family": "ALONSO",
"given": [
"PEDRO"
]
}
],
"telecom": [
{
"system": "email",
"value": "sanford.lolita@gmail.com"
}
],
"gender": "male",
"birthDate": "2014-11-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:35:58.962 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:35:59.570 [print] {
"resourceType": "Patient",
"id": "13975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:03.593+02:00",
"source": "#IJm8yL8J6WalmNEr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PEDRO <b>ALONSO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>31416</td></tr><tr><td>Date of birth</td><td><span>28 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "31416"
}
],
"name": [
{
"use": "anonymous",
"text": "PEDRO ALONSO ROMERO",
"family": "ALONSO",
"given": [
"PEDRO"
]
}
],
"telecom": [
{
"system": "email",
"value": "sanford.lolita@gmail.com"
}
],
"gender": "male",
"birthDate": "2014-11-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:00.155 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:00.758 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:04.821+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:04.821+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:00.759 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTINEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "167309"
}
],
"name": [
{
"use": "anonymous",
"text": "ROBERTO LOZANO MARTINEZ",
"family": "LOZANO",
"given": [
"ROBERTO"
]
}
],
"telecom": [
{
"system": "email",
"value": "danial70@howe.info"
},
{
"system": "phone",
"value": "34 (254) 962-9016"
}
],
"gender": "male",
"birthDate": "2015-01-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:01.385 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:01.385 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2Zlk7WHUMx3fNjDI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13976/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:01.385 [print] {
"resourceType": "Patient",
"id": "13976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:06.028+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROBERTO <b>LOZANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>167309</td></tr><tr><td>Date of birth</td><td><span>08 January 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTINEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "167309"
}
],
"name": [
{
"use": "anonymous",
"text": "ROBERTO LOZANO MARTINEZ",
"family": "LOZANO",
"given": [
"ROBERTO"
]
}
],
"telecom": [
{
"system": "email",
"value": "danial70@howe.info"
},
{
"system": "phone",
"value": "34 (254) 962-9016"
}
],
"gender": "male",
"birthDate": "2015-01-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:01.385 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:01.387 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:01.387 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2Zlk7WHUMx3fNjDI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13976/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:01.387 [print] {
"resourceType": "Patient",
"id": "13976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:06.028+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROBERTO <b>LOZANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>167309</td></tr><tr><td>Date of birth</td><td><span>08 January 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTINEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "167309"
}
],
"name": [
{
"use": "anonymous",
"text": "ROBERTO LOZANO MARTINEZ",
"family": "LOZANO",
"given": [
"ROBERTO"
]
}
],
"telecom": [
{
"system": "email",
"value": "danial70@howe.info"
},
{
"system": "phone",
"value": "34 (254) 962-9016"
}
],
"gender": "male",
"birthDate": "2015-01-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:01.387 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:02.000 [print] {
"resourceType": "Patient",
"id": "13976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:06.028+02:00",
"source": "#2Zlk7WHUMx3fNjDI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROBERTO <b>LOZANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>167309</td></tr><tr><td>Date of birth</td><td><span>08 January 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTINEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "167309"
}
],
"name": [
{
"use": "anonymous",
"text": "ROBERTO LOZANO MARTINEZ",
"family": "LOZANO",
"given": [
"ROBERTO"
]
}
],
"telecom": [
{
"system": "email",
"value": "danial70@howe.info"
},
{
"system": "phone",
"value": "34 (254) 962-9016"
}
],
"gender": "male",
"birthDate": "2015-01-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:02.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:03.202 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:07.272+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:07.272+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:03.204 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PARRA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "210911"
}
],
"name": [
{
"use": "anonymous",
"text": "BEATRIZ CASTRO PARRA",
"family": "CASTRO",
"given": [
"BEATRIZ"
]
}
],
"telecom": [
{
"system": "email",
"value": "winona.reynolds@boyle.net"
},
{
"system": "phone",
"value": "34 (443) 373-7676"
}
],
"gender": "female",
"birthDate": "2015-03-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:03.851 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:03.851 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RRuCZcT7JfkZ5etl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13977/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:03.851 [print] {
"resourceType": "Patient",
"id": "13977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:08.486+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">BEATRIZ <b>CASTRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>210911</td></tr><tr><td>Date of birth</td><td><span>25 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PARRA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "210911"
}
],
"name": [
{
"use": "anonymous",
"text": "BEATRIZ CASTRO PARRA",
"family": "CASTRO",
"given": [
"BEATRIZ"
]
}
],
"telecom": [
{
"system": "email",
"value": "winona.reynolds@boyle.net"
},
{
"system": "phone",
"value": "34 (443) 373-7676"
}
],
"gender": "female",
"birthDate": "2015-03-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:03.851 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:03.853 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:03.853 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RRuCZcT7JfkZ5etl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13977/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:03.853 [print] {
"resourceType": "Patient",
"id": "13977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:08.486+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">BEATRIZ <b>CASTRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>210911</td></tr><tr><td>Date of birth</td><td><span>25 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PARRA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "210911"
}
],
"name": [
{
"use": "anonymous",
"text": "BEATRIZ CASTRO PARRA",
"family": "CASTRO",
"given": [
"BEATRIZ"
]
}
],
"telecom": [
{
"system": "email",
"value": "winona.reynolds@boyle.net"
},
{
"system": "phone",
"value": "34 (443) 373-7676"
}
],
"gender": "female",
"birthDate": "2015-03-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:03.853 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:04.507 [print] {
"resourceType": "Patient",
"id": "13977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:08.486+02:00",
"source": "#RRuCZcT7JfkZ5etl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">BEATRIZ <b>CASTRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>210911</td></tr><tr><td>Date of birth</td><td><span>25 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PARRA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "210911"
}
],
"name": [
{
"use": "anonymous",
"text": "BEATRIZ CASTRO PARRA",
"family": "CASTRO",
"given": [
"BEATRIZ"
]
}
],
"telecom": [
{
"system": "email",
"value": "winona.reynolds@boyle.net"
},
{
"system": "phone",
"value": "34 (443) 373-7676"
}
],
"gender": "female",
"birthDate": "2015-03-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:05.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:06.206 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:10.277+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:10.277+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:06.208 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BENITEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "161528"
}
],
"name": [
{
"use": "anonymous",
"text": "LUIS MIGUEL MOYA BENITEZ",
"family": "MOYA",
"given": [
"LUIS MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "dmedhurst@gmail.com"
},
{
"system": "phone",
"value": "34 (626) 349-7961"
}
],
"gender": "male",
"birthDate": "2015-04-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:06.889 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:06.889 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TB7RNoWo1MnIgqMb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13978/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:06.889 [print] {
"resourceType": "Patient",
"id": "13978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:11.484+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUIS MIGUEL <b>MOYA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>161528</td></tr><tr><td>Date of birth</td><td><span>06 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BENITEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "161528"
}
],
"name": [
{
"use": "anonymous",
"text": "LUIS MIGUEL MOYA BENITEZ",
"family": "MOYA",
"given": [
"LUIS MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "dmedhurst@gmail.com"
},
{
"system": "phone",
"value": "34 (626) 349-7961"
}
],
"gender": "male",
"birthDate": "2015-04-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:06.889 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:06.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:06.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TB7RNoWo1MnIgqMb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13978/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:06.892 [print] {
"resourceType": "Patient",
"id": "13978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:11.484+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUIS MIGUEL <b>MOYA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>161528</td></tr><tr><td>Date of birth</td><td><span>06 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BENITEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "161528"
}
],
"name": [
{
"use": "anonymous",
"text": "LUIS MIGUEL MOYA BENITEZ",
"family": "MOYA",
"given": [
"LUIS MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "dmedhurst@gmail.com"
},
{
"system": "phone",
"value": "34 (626) 349-7961"
}
],
"gender": "male",
"birthDate": "2015-04-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:06.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:07.470 [print] {
"resourceType": "Patient",
"id": "13978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:11.484+02:00",
"source": "#TB7RNoWo1MnIgqMb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUIS MIGUEL <b>MOYA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>161528</td></tr><tr><td>Date of birth</td><td><span>06 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BENITEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "161528"
}
],
"name": [
{
"use": "anonymous",
"text": "LUIS MIGUEL MOYA BENITEZ",
"family": "MOYA",
"given": [
"LUIS MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "dmedhurst@gmail.com"
},
{
"system": "phone",
"value": "34 (626) 349-7961"
}
],
"gender": "male",
"birthDate": "2015-04-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:09.306 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:09.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:13.964+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:13.964+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:09.952 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MENDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "26894"
}
],
"name": [
{
"use": "anonymous",
"text": "MONICA SANTOS MENDEZ",
"family": "SANTOS",
"given": [
"MONICA"
]
}
],
"telecom": [
{
"system": "email",
"value": "irving25@schoen.info"
},
{
"system": "phone",
"value": "34 (655) 966-7939"
}
],
"gender": "female",
"birthDate": "2015-04-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:10.628 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:10.628 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uHfBzzIr1Ild0aqN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13979/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:10.628 [print] {
"resourceType": "Patient",
"id": "13979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:15.271+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MONICA <b>SANTOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>26894</td></tr><tr><td>Date of birth</td><td><span>13 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MENDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "26894"
}
],
"name": [
{
"use": "anonymous",
"text": "MONICA SANTOS MENDEZ",
"family": "SANTOS",
"given": [
"MONICA"
]
}
],
"telecom": [
{
"system": "email",
"value": "irving25@schoen.info"
},
{
"system": "phone",
"value": "34 (655) 966-7939"
}
],
"gender": "female",
"birthDate": "2015-04-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:10.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:10.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:10.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uHfBzzIr1Ild0aqN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13979/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:10.631 [print] {
"resourceType": "Patient",
"id": "13979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:15.271+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MONICA <b>SANTOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>26894</td></tr><tr><td>Date of birth</td><td><span>13 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MENDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "26894"
}
],
"name": [
{
"use": "anonymous",
"text": "MONICA SANTOS MENDEZ",
"family": "SANTOS",
"given": [
"MONICA"
]
}
],
"telecom": [
{
"system": "email",
"value": "irving25@schoen.info"
},
{
"system": "phone",
"value": "34 (655) 966-7939"
}
],
"gender": "female",
"birthDate": "2015-04-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:10.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:11.247 [print] {
"resourceType": "Patient",
"id": "13979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:15.271+02:00",
"source": "#uHfBzzIr1Ild0aqN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MONICA <b>SANTOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>26894</td></tr><tr><td>Date of birth</td><td><span>13 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MENDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "26894"
}
],
"name": [
{
"use": "anonymous",
"text": "MONICA SANTOS MENDEZ",
"family": "SANTOS",
"given": [
"MONICA"
]
}
],
"telecom": [
{
"system": "email",
"value": "irving25@schoen.info"
},
{
"system": "phone",
"value": "34 (655) 966-7939"
}
],
"gender": "female",
"birthDate": "2015-04-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:11.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:13.717 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:16.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:16.496+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:13.717 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "48922"
}
],
"name": [
{
"use": "anonymous",
"text": "ANDREA CASTILLO MORA",
"family": "CASTILLO",
"given": [
"ANDREA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hkerluke@gmail.com"
},
{
"system": "phone",
"value": "34 (882) 961-0527"
}
],
"gender": "female",
"birthDate": "2015-05-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:14.371 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:14.371 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HA3jllfcnl74GyBm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13980/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:14.371 [print] {
"resourceType": "Patient",
"id": "13980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:19.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANDREA <b>CASTILLO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>48922</td></tr><tr><td>Date of birth</td><td><span>22 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "48922"
}
],
"name": [
{
"use": "anonymous",
"text": "ANDREA CASTILLO MORA",
"family": "CASTILLO",
"given": [
"ANDREA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hkerluke@gmail.com"
},
{
"system": "phone",
"value": "34 (882) 961-0527"
}
],
"gender": "female",
"birthDate": "2015-05-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:14.371 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:14.371 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:14.371 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HA3jllfcnl74GyBm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13980/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:14.371 [print] {
"resourceType": "Patient",
"id": "13980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:19.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANDREA <b>CASTILLO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>48922</td></tr><tr><td>Date of birth</td><td><span>22 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "48922"
}
],
"name": [
{
"use": "anonymous",
"text": "ANDREA CASTILLO MORA",
"family": "CASTILLO",
"given": [
"ANDREA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hkerluke@gmail.com"
},
{
"system": "phone",
"value": "34 (882) 961-0527"
}
],
"gender": "female",
"birthDate": "2015-05-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:14.371 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:15.002 [print] {
"resourceType": "Patient",
"id": "13980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:19.015+02:00",
"source": "#HA3jllfcnl74GyBm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANDREA <b>CASTILLO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>48922</td></tr><tr><td>Date of birth</td><td><span>22 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "48922"
}
],
"name": [
{
"use": "anonymous",
"text": "ANDREA CASTILLO MORA",
"family": "CASTILLO",
"given": [
"ANDREA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hkerluke@gmail.com"
},
{
"system": "phone",
"value": "34 (882) 961-0527"
}
],
"gender": "female",
"birthDate": "2015-05-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:15.637 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:16.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:20.295+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:20.295+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:16.265 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VARGAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "13161"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN MARTINEZ VARGAS",
"family": "MARTINEZ",
"given": [
"JUAN"
]
}
],
"telecom": [
],
"gender": "male",
"birthDate": "2015-12-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:16.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"694"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:16.885 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c9fFbfYyRQqIBvxP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13981/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:16.885 [print] {
"resourceType": "Patient",
"id": "13981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:21.524+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN <b>MARTINEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>13161</td></tr><tr><td>Date of birth</td><td><span>11 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VARGAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "13161"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN MARTINEZ VARGAS",
"family": "MARTINEZ",
"given": [
"JUAN"
]
}
],
"gender": "male",
"birthDate": "2015-12-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:16.885 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:16.885 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"694"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:16.885 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c9fFbfYyRQqIBvxP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13981/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:16.885 [print] {
"resourceType": "Patient",
"id": "13981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:21.524+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN <b>MARTINEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>13161</td></tr><tr><td>Date of birth</td><td><span>11 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VARGAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "13161"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN MARTINEZ VARGAS",
"family": "MARTINEZ",
"given": [
"JUAN"
]
}
],
"gender": "male",
"birthDate": "2015-12-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:16.885 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:17.684 [print] {
"resourceType": "Patient",
"id": "13981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:21.524+02:00",
"source": "#c9fFbfYyRQqIBvxP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN <b>MARTINEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>13161</td></tr><tr><td>Date of birth</td><td><span>11 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VARGAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "13161"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN MARTINEZ VARGAS",
"family": "MARTINEZ",
"given": [
"JUAN"
]
}
],
"gender": "male",
"birthDate": "2015-12-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:18.319 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:18.953 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:22.988+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:22.988+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:18.954 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLARDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "197018"
}
],
"name": [
{
"use": "anonymous",
"text": "DANIELA PASCUAL GALLARDO",
"family": "PASCUAL",
"given": [
"DANIELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "percival00@yahoo.com"
},
{
"system": "phone",
"value": "34 (973) 486-1567"
}
],
"gender": "female",
"birthDate": "2016-05-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:19.565 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:19.565 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AqyiQqEU3TdKQmEB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13982/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:19.565 [print] {
"resourceType": "Patient",
"id": "13982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:24.210+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DANIELA <b>PASCUAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>197018</td></tr><tr><td>Date of birth</td><td><span>27 May 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLARDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "197018"
}
],
"name": [
{
"use": "anonymous",
"text": "DANIELA PASCUAL GALLARDO",
"family": "PASCUAL",
"given": [
"DANIELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "percival00@yahoo.com"
},
{
"system": "phone",
"value": "34 (973) 486-1567"
}
],
"gender": "female",
"birthDate": "2016-05-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:19.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:19.565 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:19.565 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AqyiQqEU3TdKQmEB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13982/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:19.565 [print] {
"resourceType": "Patient",
"id": "13982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:24.210+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DANIELA <b>PASCUAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>197018</td></tr><tr><td>Date of birth</td><td><span>27 May 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLARDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "197018"
}
],
"name": [
{
"use": "anonymous",
"text": "DANIELA PASCUAL GALLARDO",
"family": "PASCUAL",
"given": [
"DANIELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "percival00@yahoo.com"
},
{
"system": "phone",
"value": "34 (973) 486-1567"
}
],
"gender": "female",
"birthDate": "2016-05-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:19.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:22.412 [print] {
"resourceType": "Patient",
"id": "13982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:24.210+02:00",
"source": "#AqyiQqEU3TdKQmEB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DANIELA <b>PASCUAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>197018</td></tr><tr><td>Date of birth</td><td><span>27 May 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLARDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "197018"
}
],
"name": [
{
"use": "anonymous",
"text": "DANIELA PASCUAL GALLARDO",
"family": "PASCUAL",
"given": [
"DANIELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "percival00@yahoo.com"
},
{
"system": "phone",
"value": "34 (973) 486-1567"
}
],
"gender": "female",
"birthDate": "2016-05-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:24.354 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:24.971 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:29.012+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:29.012+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:24.971 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PRIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "68616"
}
],
"name": [
{
"use": "anonymous",
"text": "ALVARO SERRANO PRIETO",
"family": "SERRANO",
"given": [
"ALVARO"
]
}
],
"telecom": [
{
"system": "email",
"value": "esteban86@gmail.com"
}
],
"gender": "male",
"birthDate": "2016-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:25.616 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"744"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:25.616 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"os7JMMWd66xs86fK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13983/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:25.616 [print] {
"resourceType": "Patient",
"id": "13983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:30.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALVARO <b>SERRANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>68616</td></tr><tr><td>Date of birth</td><td><span>22 August 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PRIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "68616"
}
],
"name": [
{
"use": "anonymous",
"text": "ALVARO SERRANO PRIETO",
"family": "SERRANO",
"given": [
"ALVARO"
]
}
],
"telecom": [
{
"system": "email",
"value": "esteban86@gmail.com"
}
],
"gender": "male",
"birthDate": "2016-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:25.616 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:25.618 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"744"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:25.618 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"os7JMMWd66xs86fK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13983/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:25.618 [print] {
"resourceType": "Patient",
"id": "13983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:30.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALVARO <b>SERRANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>68616</td></tr><tr><td>Date of birth</td><td><span>22 August 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PRIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "68616"
}
],
"name": [
{
"use": "anonymous",
"text": "ALVARO SERRANO PRIETO",
"family": "SERRANO",
"given": [
"ALVARO"
]
}
],
"telecom": [
{
"system": "email",
"value": "esteban86@gmail.com"
}
],
"gender": "male",
"birthDate": "2016-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:25.618 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:26.186 [print] {
"resourceType": "Patient",
"id": "13983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:30.261+02:00",
"source": "#os7JMMWd66xs86fK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALVARO <b>SERRANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>68616</td></tr><tr><td>Date of birth</td><td><span>22 August 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PRIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "68616"
}
],
"name": [
{
"use": "anonymous",
"text": "ALVARO SERRANO PRIETO",
"family": "SERRANO",
"given": [
"ALVARO"
]
}
],
"telecom": [
{
"system": "email",
"value": "esteban86@gmail.com"
}
],
"gender": "male",
"birthDate": "2016-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:26.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:27.420 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:31.469+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:31.469+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:27.420 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LORENZO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142762"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGELA FLORES LORENZO",
"family": "FLORES",
"given": [
"ANGELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "schowalter.savanah@yahoo.com"
},
{
"system": "phone",
"value": "34 (305) 259-7862"
}
],
"gender": "female",
"birthDate": "2016-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:28.433 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:28.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nDDAxYr7TDUgzx6o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13984/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:28.433 [print] {
"resourceType": "Patient",
"id": "13984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:32.657+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGELA <b>FLORES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142762</td></tr><tr><td>Date of birth</td><td><span>02 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LORENZO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142762"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGELA FLORES LORENZO",
"family": "FLORES",
"given": [
"ANGELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "schowalter.savanah@yahoo.com"
},
{
"system": "phone",
"value": "34 (305) 259-7862"
}
],
"gender": "female",
"birthDate": "2016-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:28.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:28.433 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:28.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nDDAxYr7TDUgzx6o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13984/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:28.433 [print] {
"resourceType": "Patient",
"id": "13984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:32.657+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGELA <b>FLORES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142762</td></tr><tr><td>Date of birth</td><td><span>02 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LORENZO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142762"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGELA FLORES LORENZO",
"family": "FLORES",
"given": [
"ANGELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "schowalter.savanah@yahoo.com"
},
{
"system": "phone",
"value": "34 (305) 259-7862"
}
],
"gender": "female",
"birthDate": "2016-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:28.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:29.318 [print] {
"resourceType": "Patient",
"id": "13984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:32.657+02:00",
"source": "#nDDAxYr7TDUgzx6o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGELA <b>FLORES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142762</td></tr><tr><td>Date of birth</td><td><span>02 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LORENZO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142762"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGELA FLORES LORENZO",
"family": "FLORES",
"given": [
"ANGELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "schowalter.savanah@yahoo.com"
},
{
"system": "phone",
"value": "34 (305) 259-7862"
}
],
"gender": "female",
"birthDate": "2016-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:29.982 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:30.691 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:34.628+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:34.628+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:30.706 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMIREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "80259"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBERTO GIL RAMIREZ",
"family": "GIL",
"given": [
"ALBERTO"
]
}
],
"telecom": [
{
"system": "email",
"value": "rsauer@rosenbaum.com"
}
],
"gender": "male",
"birthDate": "2017-02-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:31.364 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"741"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:31.364 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e970gvWaZy38Ls4m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13985/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:31.364 [print] {
"resourceType": "Patient",
"id": "13985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:36.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBERTO <b>GIL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>80259</td></tr><tr><td>Date of birth</td><td><span>17 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMIREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "80259"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBERTO GIL RAMIREZ",
"family": "GIL",
"given": [
"ALBERTO"
]
}
],
"telecom": [
{
"system": "email",
"value": "rsauer@rosenbaum.com"
}
],
"gender": "male",
"birthDate": "2017-02-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:31.364 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:31.367 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"741"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:31.367 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e970gvWaZy38Ls4m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13985/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:31.367 [print] {
"resourceType": "Patient",
"id": "13985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:36.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBERTO <b>GIL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>80259</td></tr><tr><td>Date of birth</td><td><span>17 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMIREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "80259"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBERTO GIL RAMIREZ",
"family": "GIL",
"given": [
"ALBERTO"
]
}
],
"telecom": [
{
"system": "email",
"value": "rsauer@rosenbaum.com"
}
],
"gender": "male",
"birthDate": "2017-02-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:31.367 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:32.003 [print] {
"resourceType": "Patient",
"id": "13985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:36.006+02:00",
"source": "#e970gvWaZy38Ls4m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBERTO <b>GIL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>80259</td></tr><tr><td>Date of birth</td><td><span>17 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMIREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "80259"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBERTO GIL RAMIREZ",
"family": "GIL",
"given": [
"ALBERTO"
]
}
],
"telecom": [
{
"system": "email",
"value": "rsauer@rosenbaum.com"
}
],
"gender": "male",
"birthDate": "2017-02-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:32.836 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:34.499 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:37.504+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:37.504+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:34.499 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "114482"
}
],
"name": [
{
"use": "anonymous",
"text": "TOMAS AGUILAR GIL",
"family": "AGUILAR",
"given": [
"TOMAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "tbruen@hermiston.net"
},
{
"system": "phone",
"value": "34 (268) 970-4413"
}
],
"gender": "male",
"birthDate": "2017-05-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:36.110 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"785"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:36.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uj2ynWSBW1baXtTe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13986/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:36.111 [print] {
"resourceType": "Patient",
"id": "13986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:40.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">TOMAS <b>AGUILAR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>114482</td></tr><tr><td>Date of birth</td><td><span>18 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "114482"
}
],
"name": [
{
"use": "anonymous",
"text": "TOMAS AGUILAR GIL",
"family": "AGUILAR",
"given": [
"TOMAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "tbruen@hermiston.net"
},
{
"system": "phone",
"value": "34 (268) 970-4413"
}
],
"gender": "male",
"birthDate": "2017-05-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:36.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:36.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"785"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:36.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uj2ynWSBW1baXtTe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13986/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:36.113 [print] {
"resourceType": "Patient",
"id": "13986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:40.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">TOMAS <b>AGUILAR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>114482</td></tr><tr><td>Date of birth</td><td><span>18 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "114482"
}
],
"name": [
{
"use": "anonymous",
"text": "TOMAS AGUILAR GIL",
"family": "AGUILAR",
"given": [
"TOMAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "tbruen@hermiston.net"
},
{
"system": "phone",
"value": "34 (268) 970-4413"
}
],
"gender": "male",
"birthDate": "2017-05-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:36.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:36.765 [print] {
"resourceType": "Patient",
"id": "13986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:40.756+02:00",
"source": "#uj2ynWSBW1baXtTe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">TOMAS <b>AGUILAR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>114482</td></tr><tr><td>Date of birth</td><td><span>18 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "114482"
}
],
"name": [
{
"use": "anonymous",
"text": "TOMAS AGUILAR GIL",
"family": "AGUILAR",
"given": [
"TOMAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "tbruen@hermiston.net"
},
{
"system": "phone",
"value": "34 (268) 970-4413"
}
],
"gender": "male",
"birthDate": "2017-05-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:37.403 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:38.019 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:42.074+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:42.074+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:38.019 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARRIDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "172783"
}
],
"name": [
{
"use": "anonymous",
"text": "VERONICA CABALLERO GARRIDO",
"family": "CABALLERO",
"given": [
"VERONICA"
]
}
],
"telecom": [
{
"system": "email",
"value": "vrowe@gmail.com"
},
{
"system": "phone",
"value": "34 (272) 412-0603"
}
],
"gender": "female",
"birthDate": "2017-08-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:38.666 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:38.666 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h95xlLFT6q48o31f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13987/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:38.666 [print] {
"resourceType": "Patient",
"id": "13987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:43.285+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VERONICA <b>CABALLERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>172783</td></tr><tr><td>Date of birth</td><td><span>31 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARRIDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "172783"
}
],
"name": [
{
"use": "anonymous",
"text": "VERONICA CABALLERO GARRIDO",
"family": "CABALLERO",
"given": [
"VERONICA"
]
}
],
"telecom": [
{
"system": "email",
"value": "vrowe@gmail.com"
},
{
"system": "phone",
"value": "34 (272) 412-0603"
}
],
"gender": "female",
"birthDate": "2017-08-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:38.666 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:38.666 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:38.666 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h95xlLFT6q48o31f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13987/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:38.666 [print] {
"resourceType": "Patient",
"id": "13987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:43.285+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VERONICA <b>CABALLERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>172783</td></tr><tr><td>Date of birth</td><td><span>31 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARRIDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "172783"
}
],
"name": [
{
"use": "anonymous",
"text": "VERONICA CABALLERO GARRIDO",
"family": "CABALLERO",
"given": [
"VERONICA"
]
}
],
"telecom": [
{
"system": "email",
"value": "vrowe@gmail.com"
},
{
"system": "phone",
"value": "34 (272) 412-0603"
}
],
"gender": "female",
"birthDate": "2017-08-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:38.666 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:39.509 [print] {
"resourceType": "Patient",
"id": "13987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:43.285+02:00",
"source": "#h95xlLFT6q48o31f",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VERONICA <b>CABALLERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>172783</td></tr><tr><td>Date of birth</td><td><span>31 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARRIDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "172783"
}
],
"name": [
{
"use": "anonymous",
"text": "VERONICA CABALLERO GARRIDO",
"family": "CABALLERO",
"given": [
"VERONICA"
]
}
],
"telecom": [
{
"system": "email",
"value": "vrowe@gmail.com"
},
{
"system": "phone",
"value": "34 (272) 412-0603"
}
],
"gender": "female",
"birthDate": "2017-08-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:40.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:40.740 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:44.802+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:44.802+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:40.740 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "120311"
}
],
"name": [
{
"use": "anonymous",
"text": "CRISTINA RUIZ SANTOS",
"family": "RUIZ",
"given": [
"CRISTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kelvin.bauch@hills.info"
},
{
"system": "phone",
"value": "34 (657) 893-2867"
}
],
"gender": "female",
"birthDate": "2017-09-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:41.401 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:41.401 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ybHSMIl5Gzem6PPm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13988/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:41.401 [print] {
"resourceType": "Patient",
"id": "13988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:46.041+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CRISTINA <b>RUIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>120311</td></tr><tr><td>Date of birth</td><td><span>25 September 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "120311"
}
],
"name": [
{
"use": "anonymous",
"text": "CRISTINA RUIZ SANTOS",
"family": "RUIZ",
"given": [
"CRISTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kelvin.bauch@hills.info"
},
{
"system": "phone",
"value": "34 (657) 893-2867"
}
],
"gender": "female",
"birthDate": "2017-09-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:41.401 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:41.401 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:41.401 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ybHSMIl5Gzem6PPm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13988/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:41.401 [print] {
"resourceType": "Patient",
"id": "13988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:46.041+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CRISTINA <b>RUIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>120311</td></tr><tr><td>Date of birth</td><td><span>25 September 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "120311"
}
],
"name": [
{
"use": "anonymous",
"text": "CRISTINA RUIZ SANTOS",
"family": "RUIZ",
"given": [
"CRISTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kelvin.bauch@hills.info"
},
{
"system": "phone",
"value": "34 (657) 893-2867"
}
],
"gender": "female",
"birthDate": "2017-09-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:41.401 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:41.991 [print] {
"resourceType": "Patient",
"id": "13988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:46.041+02:00",
"source": "#ybHSMIl5Gzem6PPm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CRISTINA <b>RUIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>120311</td></tr><tr><td>Date of birth</td><td><span>25 September 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "120311"
}
],
"name": [
{
"use": "anonymous",
"text": "CRISTINA RUIZ SANTOS",
"family": "RUIZ",
"given": [
"CRISTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kelvin.bauch@hills.info"
},
{
"system": "phone",
"value": "34 (657) 893-2867"
}
],
"gender": "female",
"birthDate": "2017-09-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:42.604 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:46.307 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:47.262+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:47.262+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:46.307 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SERRANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "200690"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE LUIS JIMENEZ SERRANO",
"family": "JIMENEZ",
"given": [
"JOSE LUIS"
]
}
],
"telecom": [
{
"system": "email",
"value": "franz72@yahoo.com"
},
{
"system": "phone",
"value": "34 (267) 295-6882"
}
],
"gender": "male",
"birthDate": "2013-02-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:46.981 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:46.981 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yMfASZsrVxbEMcOS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13989/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:46.981 [print] {
"resourceType": "Patient",
"id": "13989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:51.622+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE LUIS <b>JIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>200690</td></tr><tr><td>Date of birth</td><td><span>18 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SERRANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "200690"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE LUIS JIMENEZ SERRANO",
"family": "JIMENEZ",
"given": [
"JOSE LUIS"
]
}
],
"telecom": [
{
"system": "email",
"value": "franz72@yahoo.com"
},
{
"system": "phone",
"value": "34 (267) 295-6882"
}
],
"gender": "male",
"birthDate": "2013-02-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:46.981 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:46.981 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:46.981 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yMfASZsrVxbEMcOS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13989/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:46.981 [print] {
"resourceType": "Patient",
"id": "13989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:51.622+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE LUIS <b>JIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>200690</td></tr><tr><td>Date of birth</td><td><span>18 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SERRANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "200690"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE LUIS JIMENEZ SERRANO",
"family": "JIMENEZ",
"given": [
"JOSE LUIS"
]
}
],
"telecom": [
{
"system": "email",
"value": "franz72@yahoo.com"
},
{
"system": "phone",
"value": "34 (267) 295-6882"
}
],
"gender": "male",
"birthDate": "2013-02-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:46.981 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:47.577 [print] {
"resourceType": "Patient",
"id": "13989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:51.622+02:00",
"source": "#yMfASZsrVxbEMcOS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE LUIS <b>JIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>200690</td></tr><tr><td>Date of birth</td><td><span>18 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SERRANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "200690"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE LUIS JIMENEZ SERRANO",
"family": "JIMENEZ",
"given": [
"JOSE LUIS"
]
}
],
"telecom": [
{
"system": "email",
"value": "franz72@yahoo.com"
},
{
"system": "phone",
"value": "34 (267) 295-6882"
}
],
"gender": "male",
"birthDate": "2013-02-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:48.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:48.967 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:53.025+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:53.025+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:48.967 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORENO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "166156"
}
],
"name": [
{
"use": "anonymous",
"text": "TERESA MEDINA MORENO",
"family": "MEDINA",
"given": [
"TERESA"
]
}
],
"telecom": [
{
"system": "email",
"value": "marjorie.grady@anderson.org"
},
{
"system": "phone",
"value": "34 (958) 205-5092"
}
],
"gender": "female",
"birthDate": "2013-08-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:49.897 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:49.897 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BOkXorjuzLVEAZkd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13990/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:49.897 [print] {
"resourceType": "Patient",
"id": "13990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:54.541+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">TERESA <b>MEDINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>166156</td></tr><tr><td>Date of birth</td><td><span>09 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORENO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "166156"
}
],
"name": [
{
"use": "anonymous",
"text": "TERESA MEDINA MORENO",
"family": "MEDINA",
"given": [
"TERESA"
]
}
],
"telecom": [
{
"system": "email",
"value": "marjorie.grady@anderson.org"
},
{
"system": "phone",
"value": "34 (958) 205-5092"
}
],
"gender": "female",
"birthDate": "2013-08-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:49.897 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:49.900 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:49.900 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BOkXorjuzLVEAZkd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13990/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:49.900 [print] {
"resourceType": "Patient",
"id": "13990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:54.541+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">TERESA <b>MEDINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>166156</td></tr><tr><td>Date of birth</td><td><span>09 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORENO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "166156"
}
],
"name": [
{
"use": "anonymous",
"text": "TERESA MEDINA MORENO",
"family": "MEDINA",
"given": [
"TERESA"
]
}
],
"telecom": [
{
"system": "email",
"value": "marjorie.grady@anderson.org"
},
{
"system": "phone",
"value": "34 (958) 205-5092"
}
],
"gender": "female",
"birthDate": "2013-08-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:49.900 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:50.517 [print] {
"resourceType": "Patient",
"id": "13990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:54.541+02:00",
"source": "#BOkXorjuzLVEAZkd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">TERESA <b>MEDINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>166156</td></tr><tr><td>Date of birth</td><td><span>09 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORENO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "166156"
}
],
"name": [
{
"use": "anonymous",
"text": "TERESA MEDINA MORENO",
"family": "MEDINA",
"given": [
"TERESA"
]
}
],
"telecom": [
{
"system": "email",
"value": "marjorie.grady@anderson.org"
},
{
"system": "phone",
"value": "34 (958) 205-5092"
}
],
"gender": "female",
"birthDate": "2013-08-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:51.335 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:52.010 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:55.999+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:55.999+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:52.012 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12629"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBA ORTEGA ORTIZ",
"family": "ORTEGA",
"given": [
"ALBA"
]
}
],
"telecom": [
{
"system": "email",
"value": "constance44@gmail.com"
},
{
"system": "phone",
"value": "34 (531) 944-7324"
}
],
"gender": "female",
"birthDate": "2013-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:52.636 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:52.636 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OVr9jW7rQF19DbFA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13991/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:52.636 [print] {
"resourceType": "Patient",
"id": "13991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:57.290+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBA <b>ORTEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12629</td></tr><tr><td>Date of birth</td><td><span>22 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12629"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBA ORTEGA ORTIZ",
"family": "ORTEGA",
"given": [
"ALBA"
]
}
],
"telecom": [
{
"system": "email",
"value": "constance44@gmail.com"
},
{
"system": "phone",
"value": "34 (531) 944-7324"
}
],
"gender": "female",
"birthDate": "2013-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:52.636 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:52.636 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:52.636 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OVr9jW7rQF19DbFA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13991/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:36:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:36:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:52.636 [print] {
"resourceType": "Patient",
"id": "13991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:57.290+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBA <b>ORTEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12629</td></tr><tr><td>Date of birth</td><td><span>22 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12629"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBA ORTEGA ORTIZ",
"family": "ORTEGA",
"given": [
"ALBA"
]
}
],
"telecom": [
{
"system": "email",
"value": "constance44@gmail.com"
},
{
"system": "phone",
"value": "34 (531) 944-7324"
}
],
"gender": "female",
"birthDate": "2013-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:52.636 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:53.268 [print] {
"resourceType": "Patient",
"id": "13991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:36:57.290+02:00",
"source": "#OVr9jW7rQF19DbFA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALBA <b>ORTEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12629</td></tr><tr><td>Date of birth</td><td><span>22 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12629"
}
],
"name": [
{
"use": "anonymous",
"text": "ALBA ORTEGA ORTIZ",
"family": "ORTEGA",
"given": [
"ALBA"
]
}
],
"telecom": [
{
"system": "email",
"value": "constance44@gmail.com"
},
{
"system": "phone",
"value": "34 (531) 944-7324"
}
],
"gender": "female",
"birthDate": "2013-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:53.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:55.494 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:36:58.513+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:36:58.513+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:55.497 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTANA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "30142"
}
],
"name": [
{
"use": "anonymous",
"text": "LUCIA MORENO SANTANA",
"family": "MORENO",
"given": [
"LUCIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "bridgette35@gmail.com"
},
{
"system": "phone",
"value": "34 (324) 886-9157"
}
],
"gender": "female",
"birthDate": "2013-09-19",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:56.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:56.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HlSuaqpCQAZ6KDXs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13992/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:56.136 [print] {
"resourceType": "Patient",
"id": "13992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:00.778+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUCIA <b>MORENO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>30142</td></tr><tr><td>Date of birth</td><td><span>19 September 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTANA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "30142"
}
],
"name": [
{
"use": "anonymous",
"text": "LUCIA MORENO SANTANA",
"family": "MORENO",
"given": [
"LUCIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "bridgette35@gmail.com"
},
{
"system": "phone",
"value": "34 (324) 886-9157"
}
],
"gender": "female",
"birthDate": "2013-09-19",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:56.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:56.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:56.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HlSuaqpCQAZ6KDXs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13992/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:56.138 [print] {
"resourceType": "Patient",
"id": "13992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:00.778+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUCIA <b>MORENO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>30142</td></tr><tr><td>Date of birth</td><td><span>19 September 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTANA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "30142"
}
],
"name": [
{
"use": "anonymous",
"text": "LUCIA MORENO SANTANA",
"family": "MORENO",
"given": [
"LUCIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "bridgette35@gmail.com"
},
{
"system": "phone",
"value": "34 (324) 886-9157"
}
],
"gender": "female",
"birthDate": "2013-09-19",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:56.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:56.734 [print] {
"resourceType": "Patient",
"id": "13992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:00.778+02:00",
"source": "#HlSuaqpCQAZ6KDXs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUCIA <b>MORENO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>30142</td></tr><tr><td>Date of birth</td><td><span>19 September 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTANA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "30142"
}
],
"name": [
{
"use": "anonymous",
"text": "LUCIA MORENO SANTANA",
"family": "MORENO",
"given": [
"LUCIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "bridgette35@gmail.com"
},
{
"system": "phone",
"value": "34 (324) 886-9157"
}
],
"gender": "female",
"birthDate": "2013-09-19",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:57.341 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:36:57.954 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:02.002+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:02.002+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:36:57.954 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "152334"
}
],
"name": [
{
"use": "anonymous",
"text": "MARCOS CRUZ MARIN",
"family": "CRUZ",
"given": [
"MARCOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "vivien.macejkovic@gmail.com"
}
],
"gender": "male",
"birthDate": "2013-10-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:58.605 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"745"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:58.605 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XoH6QoxnjoyhooQV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13993/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:58.605 [print] {
"resourceType": "Patient",
"id": "13993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:03.249+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARCOS <b>CRUZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>152334</td></tr><tr><td>Date of birth</td><td><span>29 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "152334"
}
],
"name": [
{
"use": "anonymous",
"text": "MARCOS CRUZ MARIN",
"family": "CRUZ",
"given": [
"MARCOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "vivien.macejkovic@gmail.com"
}
],
"gender": "male",
"birthDate": "2013-10-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:58.605 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:36:58.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"745"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:36:58.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XoH6QoxnjoyhooQV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13993/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:36:58.608 [print] {
"resourceType": "Patient",
"id": "13993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:03.249+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARCOS <b>CRUZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>152334</td></tr><tr><td>Date of birth</td><td><span>29 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "152334"
}
],
"name": [
{
"use": "anonymous",
"text": "MARCOS CRUZ MARIN",
"family": "CRUZ",
"given": [
"MARCOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "vivien.macejkovic@gmail.com"
}
],
"gender": "male",
"birthDate": "2013-10-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:36:58.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:36:59.218 [print] {
"resourceType": "Patient",
"id": "13993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:03.249+02:00",
"source": "#XoH6QoxnjoyhooQV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARCOS <b>CRUZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>152334</td></tr><tr><td>Date of birth</td><td><span>29 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "152334"
}
],
"name": [
{
"use": "anonymous",
"text": "MARCOS CRUZ MARIN",
"family": "CRUZ",
"given": [
"MARCOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "vivien.macejkovic@gmail.com"
}
],
"gender": "male",
"birthDate": "2013-10-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:36:59.844 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:00.410 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:04.504+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:04.504+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:00.412 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IBAÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "136821"
}
],
"name": [
{
"use": "anonymous",
"text": "SOFIA CABRERA IBAÑEZ",
"family": "CABRERA",
"given": [
"SOFIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "pschiller@cole.net"
},
{
"system": "phone",
"value": "34 (314) 509-1559"
}
],
"gender": "female",
"birthDate": "2014-03-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:01.065 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:01.065 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dMDiOTjKQnJ3kfNS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13994/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:01.065 [print] {
"resourceType": "Patient",
"id": "13994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:05.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SOFIA <b>CABRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>136821</td></tr><tr><td>Date of birth</td><td><span>31 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IBAÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "136821"
}
],
"name": [
{
"use": "anonymous",
"text": "SOFIA CABRERA IBAÑEZ",
"family": "CABRERA",
"given": [
"SOFIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "pschiller@cole.net"
},
{
"system": "phone",
"value": "34 (314) 509-1559"
}
],
"gender": "female",
"birthDate": "2014-03-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:01.065 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:01.065 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:01.065 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dMDiOTjKQnJ3kfNS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13994/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:01.065 [print] {
"resourceType": "Patient",
"id": "13994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:05.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SOFIA <b>CABRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>136821</td></tr><tr><td>Date of birth</td><td><span>31 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IBAÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "136821"
}
],
"name": [
{
"use": "anonymous",
"text": "SOFIA CABRERA IBAÑEZ",
"family": "CABRERA",
"given": [
"SOFIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "pschiller@cole.net"
},
{
"system": "phone",
"value": "34 (314) 509-1559"
}
],
"gender": "female",
"birthDate": "2014-03-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:01.065 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:01.714 [print] {
"resourceType": "Patient",
"id": "13994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:05.711+02:00",
"source": "#dMDiOTjKQnJ3kfNS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SOFIA <b>CABRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>136821</td></tr><tr><td>Date of birth</td><td><span>31 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IBAÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "136821"
}
],
"name": [
{
"use": "anonymous",
"text": "SOFIA CABRERA IBAÑEZ",
"family": "CABRERA",
"given": [
"SOFIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "pschiller@cole.net"
},
{
"system": "phone",
"value": "34 (314) 509-1559"
}
],
"gender": "female",
"birthDate": "2014-03-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:02.369 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:03.962 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:07.029+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:07.029+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:03.965 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASTOR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142326"
}
],
"name": [
{
"use": "anonymous",
"text": "DIEGO BLANCO PASTOR",
"family": "BLANCO",
"given": [
"DIEGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "nolan.candice@zieme.com"
},
{
"system": "phone",
"value": "34 (873) 638-6226"
}
],
"gender": "male",
"birthDate": "2014-04-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:04.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:04.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LoemEwkDL4YJEOum"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13995/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:04.568 [print] {
"resourceType": "Patient",
"id": "13995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:09.216+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DIEGO <b>BLANCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142326</td></tr><tr><td>Date of birth</td><td><span>09 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASTOR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142326"
}
],
"name": [
{
"use": "anonymous",
"text": "DIEGO BLANCO PASTOR",
"family": "BLANCO",
"given": [
"DIEGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "nolan.candice@zieme.com"
},
{
"system": "phone",
"value": "34 (873) 638-6226"
}
],
"gender": "male",
"birthDate": "2014-04-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:04.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:04.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:04.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LoemEwkDL4YJEOum"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13995/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:04.568 [print] {
"resourceType": "Patient",
"id": "13995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:09.216+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DIEGO <b>BLANCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142326</td></tr><tr><td>Date of birth</td><td><span>09 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASTOR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142326"
}
],
"name": [
{
"use": "anonymous",
"text": "DIEGO BLANCO PASTOR",
"family": "BLANCO",
"given": [
"DIEGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "nolan.candice@zieme.com"
},
{
"system": "phone",
"value": "34 (873) 638-6226"
}
],
"gender": "male",
"birthDate": "2014-04-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:04.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:05.137 [print] {
"resourceType": "Patient",
"id": "13995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:09.216+02:00",
"source": "#LoemEwkDL4YJEOum",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DIEGO <b>BLANCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142326</td></tr><tr><td>Date of birth</td><td><span>09 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASTOR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142326"
}
],
"name": [
{
"use": "anonymous",
"text": "DIEGO BLANCO PASTOR",
"family": "BLANCO",
"given": [
"DIEGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "nolan.candice@zieme.com"
},
{
"system": "phone",
"value": "34 (873) 638-6226"
}
],
"gender": "male",
"birthDate": "2014-04-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:06.733 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:07.347 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:11.407+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:11.407+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:07.349 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DOMINGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "65642"
}
],
"name": [
{
"use": "anonymous",
"text": "LORENA LORENZO DOMINGUEZ",
"family": "LORENZO",
"given": [
"LORENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "regan.hermiston@emmerich.com"
},
{
"system": "phone",
"value": "34 (407) 338-3025"
}
],
"gender": "female",
"birthDate": "2014-05-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:07.982 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:07.982 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pO1OsIz2nDDNoAyk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13996/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:07.982 [print] {
"resourceType": "Patient",
"id": "13996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:12.625+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LORENA <b>LORENZO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>65642</td></tr><tr><td>Date of birth</td><td><span>06 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DOMINGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "65642"
}
],
"name": [
{
"use": "anonymous",
"text": "LORENA LORENZO DOMINGUEZ",
"family": "LORENZO",
"given": [
"LORENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "regan.hermiston@emmerich.com"
},
{
"system": "phone",
"value": "34 (407) 338-3025"
}
],
"gender": "female",
"birthDate": "2014-05-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:07.982 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:07.982 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:07.982 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pO1OsIz2nDDNoAyk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13996/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:07.982 [print] {
"resourceType": "Patient",
"id": "13996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:12.625+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LORENA <b>LORENZO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>65642</td></tr><tr><td>Date of birth</td><td><span>06 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DOMINGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "65642"
}
],
"name": [
{
"use": "anonymous",
"text": "LORENA LORENZO DOMINGUEZ",
"family": "LORENZO",
"given": [
"LORENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "regan.hermiston@emmerich.com"
},
{
"system": "phone",
"value": "34 (407) 338-3025"
}
],
"gender": "female",
"birthDate": "2014-05-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:07.982 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:08.601 [print] {
"resourceType": "Patient",
"id": "13996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:12.625+02:00",
"source": "#pO1OsIz2nDDNoAyk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LORENA <b>LORENZO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>65642</td></tr><tr><td>Date of birth</td><td><span>06 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DOMINGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "65642"
}
],
"name": [
{
"use": "anonymous",
"text": "LORENA LORENZO DOMINGUEZ",
"family": "LORENZO",
"given": [
"LORENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "regan.hermiston@emmerich.com"
},
{
"system": "phone",
"value": "34 (407) 338-3025"
}
],
"gender": "female",
"birthDate": "2014-05-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:09.221 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:09.835 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:13.893+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:13.893+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:09.837 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MUÑOZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100550"
}
],
"name": [
{
"use": "anonymous",
"text": "PATRICIA NUÑEZ MUÑOZ",
"family": "NUÑEZ",
"given": [
"PATRICIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "utrantow@dickinson.info"
},
{
"system": "phone",
"value": "34 (617) 278-4188"
}
],
"gender": "female",
"birthDate": "2014-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:10.469 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:10.469 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ho8VOyy0Natxuznn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13997/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:10.469 [print] {
"resourceType": "Patient",
"id": "13997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:15.113+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PATRICIA <b>NUÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100550</td></tr><tr><td>Date of birth</td><td><span>02 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MUÑOZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100550"
}
],
"name": [
{
"use": "anonymous",
"text": "PATRICIA NUÑEZ MUÑOZ",
"family": "NUÑEZ",
"given": [
"PATRICIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "utrantow@dickinson.info"
},
{
"system": "phone",
"value": "34 (617) 278-4188"
}
],
"gender": "female",
"birthDate": "2014-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:10.469 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:10.471 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:10.471 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ho8VOyy0Natxuznn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13997/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:10.472 [print] {
"resourceType": "Patient",
"id": "13997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:15.113+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PATRICIA <b>NUÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100550</td></tr><tr><td>Date of birth</td><td><span>02 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MUÑOZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100550"
}
],
"name": [
{
"use": "anonymous",
"text": "PATRICIA NUÑEZ MUÑOZ",
"family": "NUÑEZ",
"given": [
"PATRICIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "utrantow@dickinson.info"
},
{
"system": "phone",
"value": "34 (617) 278-4188"
}
],
"gender": "female",
"birthDate": "2014-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:10.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:11.053 [print] {
"resourceType": "Patient",
"id": "13997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:15.113+02:00",
"source": "#ho8VOyy0Natxuznn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PATRICIA <b>NUÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100550</td></tr><tr><td>Date of birth</td><td><span>02 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MUÑOZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100550"
}
],
"name": [
{
"use": "anonymous",
"text": "PATRICIA NUÑEZ MUÑOZ",
"family": "NUÑEZ",
"given": [
"PATRICIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "utrantow@dickinson.info"
},
{
"system": "phone",
"value": "34 (617) 278-4188"
}
],
"gender": "female",
"birthDate": "2014-09-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:11.950 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:12.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:16.622+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:16.622+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:12.538 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MUÑOZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "78819"
}
],
"name": [
{
"use": "anonymous",
"text": "RAMON NUÑEZ MUÑOZ",
"family": "NUÑEZ",
"given": [
"RAMON"
]
}
],
"telecom": [
{
"system": "email",
"value": "domenico.wilkinson@donnelly.net"
},
{
"system": "phone",
"value": "34 (802) 957-9685"
}
],
"gender": "male",
"birthDate": "2015-02-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:14.506 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:14.506 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"s7BfCu3r39tPfUsT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13998/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:14.506 [print] {
"resourceType": "Patient",
"id": "13998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:19.146+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAMON <b>NUÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>78819</td></tr><tr><td>Date of birth</td><td><span>23 February 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MUÑOZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "78819"
}
],
"name": [
{
"use": "anonymous",
"text": "RAMON NUÑEZ MUÑOZ",
"family": "NUÑEZ",
"given": [
"RAMON"
]
}
],
"telecom": [
{
"system": "email",
"value": "domenico.wilkinson@donnelly.net"
},
{
"system": "phone",
"value": "34 (802) 957-9685"
}
],
"gender": "male",
"birthDate": "2015-02-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:14.506 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:14.506 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:14.506 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"s7BfCu3r39tPfUsT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13998/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:14.506 [print] {
"resourceType": "Patient",
"id": "13998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:19.146+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAMON <b>NUÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>78819</td></tr><tr><td>Date of birth</td><td><span>23 February 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MUÑOZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "78819"
}
],
"name": [
{
"use": "anonymous",
"text": "RAMON NUÑEZ MUÑOZ",
"family": "NUÑEZ",
"given": [
"RAMON"
]
}
],
"telecom": [
{
"system": "email",
"value": "domenico.wilkinson@donnelly.net"
},
{
"system": "phone",
"value": "34 (802) 957-9685"
}
],
"gender": "male",
"birthDate": "2015-02-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:14.506 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:16.140 [print] {
"resourceType": "Patient",
"id": "13998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:19.146+02:00",
"source": "#s7BfCu3r39tPfUsT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAMON <b>NUÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>78819</td></tr><tr><td>Date of birth</td><td><span>23 February 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MUÑOZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "78819"
}
],
"name": [
{
"use": "anonymous",
"text": "RAMON NUÑEZ MUÑOZ",
"family": "NUÑEZ",
"given": [
"RAMON"
]
}
],
"telecom": [
{
"system": "email",
"value": "domenico.wilkinson@donnelly.net"
},
{
"system": "phone",
"value": "34 (802) 957-9685"
}
],
"gender": "male",
"birthDate": "2015-02-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:16.750 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:17.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:21.420+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:21.420+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:17.381 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LORENZO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142824"
}
],
"name": [
{
"use": "anonymous",
"text": "IGNACIO FLORES LORENZO",
"family": "FLORES",
"given": [
"IGNACIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "patsy.hintz@satterfield.com"
},
{
"system": "phone",
"value": "34 (455) 247-1821"
}
],
"gender": "male",
"birthDate": "2015-04-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:18.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:18.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2ZUUKkDEIbTMdAPL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13999/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:18.307 [print] {
"resourceType": "Patient",
"id": "13999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:22.952+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IGNACIO <b>FLORES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142824</td></tr><tr><td>Date of birth</td><td><span>22 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LORENZO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142824"
}
],
"name": [
{
"use": "anonymous",
"text": "IGNACIO FLORES LORENZO",
"family": "FLORES",
"given": [
"IGNACIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "patsy.hintz@satterfield.com"
},
{
"system": "phone",
"value": "34 (455) 247-1821"
}
],
"gender": "male",
"birthDate": "2015-04-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:18.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:18.310 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:18.310 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2ZUUKkDEIbTMdAPL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13999/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/13999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:18.310 [print] {
"resourceType": "Patient",
"id": "13999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:22.952+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IGNACIO <b>FLORES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142824</td></tr><tr><td>Date of birth</td><td><span>22 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LORENZO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142824"
}
],
"name": [
{
"use": "anonymous",
"text": "IGNACIO FLORES LORENZO",
"family": "FLORES",
"given": [
"IGNACIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "patsy.hintz@satterfield.com"
},
{
"system": "phone",
"value": "34 (455) 247-1821"
}
],
"gender": "male",
"birthDate": "2015-04-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:18.310 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:18.934 [print] {
"resourceType": "Patient",
"id": "13999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:22.952+02:00",
"source": "#2ZUUKkDEIbTMdAPL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IGNACIO <b>FLORES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>142824</td></tr><tr><td>Date of birth</td><td><span>22 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LORENZO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "142824"
}
],
"name": [
{
"use": "anonymous",
"text": "IGNACIO FLORES LORENZO",
"family": "FLORES",
"given": [
"IGNACIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "patsy.hintz@satterfield.com"
},
{
"system": "phone",
"value": "34 (455) 247-1821"
}
],
"gender": "male",
"birthDate": "2015-04-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:19.786 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:20.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:24.449+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:24.449+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:20.380 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NAVARRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "72302"
}
],
"name": [
{
"use": "anonymous",
"text": "OSCAR RUBIO NAVARRO",
"family": "RUBIO",
"given": [
"OSCAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "felicia.shanahan@daniel.com"
},
{
"system": "phone",
"value": "34 (866) 458-8118"
}
],
"gender": "male",
"birthDate": "2015-05-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:20.978 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:20.978 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xbbaGk1NHpkl3fty"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14000/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:20.979 [print] {
"resourceType": "Patient",
"id": "14000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:25.622+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">OSCAR <b>RUBIO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>72302</td></tr><tr><td>Date of birth</td><td><span>20 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NAVARRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "72302"
}
],
"name": [
{
"use": "anonymous",
"text": "OSCAR RUBIO NAVARRO",
"family": "RUBIO",
"given": [
"OSCAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "felicia.shanahan@daniel.com"
},
{
"system": "phone",
"value": "34 (866) 458-8118"
}
],
"gender": "male",
"birthDate": "2015-05-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:20.979 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:20.981 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:20.981 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xbbaGk1NHpkl3fty"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14000/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:20.981 [print] {
"resourceType": "Patient",
"id": "14000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:25.622+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">OSCAR <b>RUBIO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>72302</td></tr><tr><td>Date of birth</td><td><span>20 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NAVARRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "72302"
}
],
"name": [
{
"use": "anonymous",
"text": "OSCAR RUBIO NAVARRO",
"family": "RUBIO",
"given": [
"OSCAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "felicia.shanahan@daniel.com"
},
{
"system": "phone",
"value": "34 (866) 458-8118"
}
],
"gender": "male",
"birthDate": "2015-05-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:20.981 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:21.556 [print] {
"resourceType": "Patient",
"id": "14000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:25.622+02:00",
"source": "#xbbaGk1NHpkl3fty",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">OSCAR <b>RUBIO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>72302</td></tr><tr><td>Date of birth</td><td><span>20 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NAVARRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "72302"
}
],
"name": [
{
"use": "anonymous",
"text": "OSCAR RUBIO NAVARRO",
"family": "RUBIO",
"given": [
"OSCAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "felicia.shanahan@daniel.com"
},
{
"system": "phone",
"value": "34 (866) 458-8118"
}
],
"gender": "male",
"birthDate": "2015-05-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:22.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:22.822 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:26.845+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:26.845+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:22.824 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PRIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "147661"
}
],
"name": [
{
"use": "anonymous",
"text": "PILAR SERRANO PRIETO",
"family": "SERRANO",
"given": [
"PILAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "hratke@yahoo.com"
},
{
"system": "phone",
"value": "34 (369) 981-7595"
}
],
"gender": "female",
"birthDate": "2015-06-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:23.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:23.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9iEJZ1fIw9Sb9GeD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14001/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:23.631 [print] {
"resourceType": "Patient",
"id": "14001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:28.277+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PILAR <b>SERRANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>147661</td></tr><tr><td>Date of birth</td><td><span>10 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PRIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "147661"
}
],
"name": [
{
"use": "anonymous",
"text": "PILAR SERRANO PRIETO",
"family": "SERRANO",
"given": [
"PILAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "hratke@yahoo.com"
},
{
"system": "phone",
"value": "34 (369) 981-7595"
}
],
"gender": "female",
"birthDate": "2015-06-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:23.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:23.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:23.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9iEJZ1fIw9Sb9GeD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14001/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:23.631 [print] {
"resourceType": "Patient",
"id": "14001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:28.277+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PILAR <b>SERRANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>147661</td></tr><tr><td>Date of birth</td><td><span>10 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PRIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "147661"
}
],
"name": [
{
"use": "anonymous",
"text": "PILAR SERRANO PRIETO",
"family": "SERRANO",
"given": [
"PILAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "hratke@yahoo.com"
},
{
"system": "phone",
"value": "34 (369) 981-7595"
}
],
"gender": "female",
"birthDate": "2015-06-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:23.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:24.246 [print] {
"resourceType": "Patient",
"id": "14001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:28.277+02:00",
"source": "#9iEJZ1fIw9Sb9GeD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PILAR <b>SERRANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>147661</td></tr><tr><td>Date of birth</td><td><span>10 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PRIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "147661"
}
],
"name": [
{
"use": "anonymous",
"text": "PILAR SERRANO PRIETO",
"family": "SERRANO",
"given": [
"PILAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "hratke@yahoo.com"
},
{
"system": "phone",
"value": "34 (369) 981-7595"
}
],
"gender": "female",
"birthDate": "2015-06-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:24.867 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:25.515 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:29.529+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:29.529+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:25.515 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RODRIGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106680"
}
],
"name": [
{
"use": "anonymous",
"text": "ELENA DOMINGUEZ RODRIGUEZ",
"family": "DOMINGUEZ",
"given": [
"ELENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ftrantow@hotmail.com"
},
{
"system": "phone",
"value": "34 (729) 381-6638"
}
],
"gender": "female",
"birthDate": "2015-07-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:26.539 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:26.539 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nr9Kin3pf3uwRGek"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14002/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:26.539 [print] {
"resourceType": "Patient",
"id": "14002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:31.176+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ELENA <b>DOMINGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106680</td></tr><tr><td>Date of birth</td><td><span>03 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RODRIGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106680"
}
],
"name": [
{
"use": "anonymous",
"text": "ELENA DOMINGUEZ RODRIGUEZ",
"family": "DOMINGUEZ",
"given": [
"ELENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ftrantow@hotmail.com"
},
{
"system": "phone",
"value": "34 (729) 381-6638"
}
],
"gender": "female",
"birthDate": "2015-07-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:26.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:26.543 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:26.543 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nr9Kin3pf3uwRGek"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14002/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:26.543 [print] {
"resourceType": "Patient",
"id": "14002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:31.176+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ELENA <b>DOMINGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106680</td></tr><tr><td>Date of birth</td><td><span>03 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RODRIGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106680"
}
],
"name": [
{
"use": "anonymous",
"text": "ELENA DOMINGUEZ RODRIGUEZ",
"family": "DOMINGUEZ",
"given": [
"ELENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ftrantow@hotmail.com"
},
{
"system": "phone",
"value": "34 (729) 381-6638"
}
],
"gender": "female",
"birthDate": "2015-07-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:26.543 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:27.174 [print] {
"resourceType": "Patient",
"id": "14002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:31.176+02:00",
"source": "#nr9Kin3pf3uwRGek",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ELENA <b>DOMINGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106680</td></tr><tr><td>Date of birth</td><td><span>03 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RODRIGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106680"
}
],
"name": [
{
"use": "anonymous",
"text": "ELENA DOMINGUEZ RODRIGUEZ",
"family": "DOMINGUEZ",
"given": [
"ELENA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ftrantow@hotmail.com"
},
{
"system": "phone",
"value": "34 (729) 381-6638"
}
],
"gender": "female",
"birthDate": "2015-07-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:27.766 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:28.391 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:32.426+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:32.426+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:28.392 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LEON"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "148036"
}
],
"name": [
{
"use": "anonymous",
"text": "ALFONSO PEÑA LEON",
"family": "PEÑA",
"given": [
"ALFONSO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (516) 855-7802"
}
],
"gender": "male",
"birthDate": "2015-12-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:29.034 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"737"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:29.034 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YjdgtBkcctgbKkWI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14003/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:29.034 [print] {
"resourceType": "Patient",
"id": "14003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:33.671+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALFONSO <b>PEÑA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>148036</td></tr><tr><td>Date of birth</td><td><span>14 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LEON"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "148036"
}
],
"name": [
{
"use": "anonymous",
"text": "ALFONSO PEÑA LEON",
"family": "PEÑA",
"given": [
"ALFONSO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (516) 855-7802"
}
],
"gender": "male",
"birthDate": "2015-12-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:29.034 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:29.034 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"737"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:29.034 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YjdgtBkcctgbKkWI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14003/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:29.034 [print] {
"resourceType": "Patient",
"id": "14003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:33.671+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALFONSO <b>PEÑA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>148036</td></tr><tr><td>Date of birth</td><td><span>14 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LEON"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "148036"
}
],
"name": [
{
"use": "anonymous",
"text": "ALFONSO PEÑA LEON",
"family": "PEÑA",
"given": [
"ALFONSO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (516) 855-7802"
}
],
"gender": "male",
"birthDate": "2015-12-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:29.034 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:29.650 [print] {
"resourceType": "Patient",
"id": "14003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:33.671+02:00",
"source": "#YjdgtBkcctgbKkWI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALFONSO <b>PEÑA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>148036</td></tr><tr><td>Date of birth</td><td><span>14 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LEON"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "148036"
}
],
"name": [
{
"use": "anonymous",
"text": "ALFONSO PEÑA LEON",
"family": "PEÑA",
"given": [
"ALFONSO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (516) 855-7802"
}
],
"gender": "male",
"birthDate": "2015-12-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:31.391 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:31.982 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:36.042+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:36.042+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:31.982 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12252"
}
],
"name": [
{
"use": "anonymous",
"text": "ESTHER AGUILAR GIL",
"family": "AGUILAR",
"given": [
"ESTHER"
]
}
],
"telecom": [
{
"system": "email",
"value": "anabelle.oconnell@kohler.com"
},
{
"system": "phone",
"value": "34 (367) 472-7422"
}
],
"gender": "female",
"birthDate": "2016-01-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:32.645 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:32.645 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DtdSZKESea2BjLwF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14004/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:32.645 [print] {
"resourceType": "Patient",
"id": "14004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:37.291+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ESTHER <b>AGUILAR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12252</td></tr><tr><td>Date of birth</td><td><span>13 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12252"
}
],
"name": [
{
"use": "anonymous",
"text": "ESTHER AGUILAR GIL",
"family": "AGUILAR",
"given": [
"ESTHER"
]
}
],
"telecom": [
{
"system": "email",
"value": "anabelle.oconnell@kohler.com"
},
{
"system": "phone",
"value": "34 (367) 472-7422"
}
],
"gender": "female",
"birthDate": "2016-01-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:32.645 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:32.645 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:32.645 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DtdSZKESea2BjLwF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14004/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:32.645 [print] {
"resourceType": "Patient",
"id": "14004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:37.291+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ESTHER <b>AGUILAR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12252</td></tr><tr><td>Date of birth</td><td><span>13 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12252"
}
],
"name": [
{
"use": "anonymous",
"text": "ESTHER AGUILAR GIL",
"family": "AGUILAR",
"given": [
"ESTHER"
]
}
],
"telecom": [
{
"system": "email",
"value": "anabelle.oconnell@kohler.com"
},
{
"system": "phone",
"value": "34 (367) 472-7422"
}
],
"gender": "female",
"birthDate": "2016-01-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:32.645 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:33.308 [print] {
"resourceType": "Patient",
"id": "14004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:37.291+02:00",
"source": "#DtdSZKESea2BjLwF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ESTHER <b>AGUILAR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12252</td></tr><tr><td>Date of birth</td><td><span>13 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12252"
}
],
"name": [
{
"use": "anonymous",
"text": "ESTHER AGUILAR GIL",
"family": "AGUILAR",
"given": [
"ESTHER"
]
}
],
"telecom": [
{
"system": "email",
"value": "anabelle.oconnell@kohler.com"
},
{
"system": "phone",
"value": "34 (367) 472-7422"
}
],
"gender": "female",
"birthDate": "2016-01-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:33.925 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:34.493 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:38.591+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:38.591+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:34.493 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FLORES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "190757"
}
],
"name": [
{
"use": "anonymous",
"text": "EVA MARIA VARGAS FLORES",
"family": "VARGAS",
"given": [
"EVA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kirlin.nat@yahoo.com"
},
{
"system": "phone",
"value": "34 (840) 314-9165"
}
],
"gender": "female",
"birthDate": "2016-02-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:35.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:35.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dsNfGNusWFTkCSND"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14005/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:35.111 [print] {
"resourceType": "Patient",
"id": "14005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:39.753+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EVA MARIA <b>VARGAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>190757</td></tr><tr><td>Date of birth</td><td><span>04 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FLORES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "190757"
}
],
"name": [
{
"use": "anonymous",
"text": "EVA MARIA VARGAS FLORES",
"family": "VARGAS",
"given": [
"EVA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kirlin.nat@yahoo.com"
},
{
"system": "phone",
"value": "34 (840) 314-9165"
}
],
"gender": "female",
"birthDate": "2016-02-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:35.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:35.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:35.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dsNfGNusWFTkCSND"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14005/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:35.111 [print] {
"resourceType": "Patient",
"id": "14005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:39.753+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EVA MARIA <b>VARGAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>190757</td></tr><tr><td>Date of birth</td><td><span>04 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FLORES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "190757"
}
],
"name": [
{
"use": "anonymous",
"text": "EVA MARIA VARGAS FLORES",
"family": "VARGAS",
"given": [
"EVA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kirlin.nat@yahoo.com"
},
{
"system": "phone",
"value": "34 (840) 314-9165"
}
],
"gender": "female",
"birthDate": "2016-02-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:35.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:35.796 [print] {
"resourceType": "Patient",
"id": "14005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:39.753+02:00",
"source": "#dsNfGNusWFTkCSND",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EVA MARIA <b>VARGAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>190757</td></tr><tr><td>Date of birth</td><td><span>04 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FLORES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "190757"
}
],
"name": [
{
"use": "anonymous",
"text": "EVA MARIA VARGAS FLORES",
"family": "VARGAS",
"given": [
"EVA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kirlin.nat@yahoo.com"
},
{
"system": "phone",
"value": "34 (840) 314-9165"
}
],
"gender": "female",
"birthDate": "2016-02-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:36.398 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:36.983 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:41.061+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:41.061+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:36.983 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOYA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164881"
}
],
"name": [
{
"use": "anonymous",
"text": "JUANA SANZ MOYA",
"family": "SANZ",
"given": [
"JUANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "afton99@shanahan.info"
},
{
"system": "phone",
"value": "34 (790) 801-8359"
}
],
"gender": "female",
"birthDate": "2016-03-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:37.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:37.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JXVhfrmPfnCAYSTZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14006/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:37.600 [print] {
"resourceType": "Patient",
"id": "14006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:42.230+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUANA <b>SANZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164881</td></tr><tr><td>Date of birth</td><td><span>16 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOYA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164881"
}
],
"name": [
{
"use": "anonymous",
"text": "JUANA SANZ MOYA",
"family": "SANZ",
"given": [
"JUANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "afton99@shanahan.info"
},
{
"system": "phone",
"value": "34 (790) 801-8359"
}
],
"gender": "female",
"birthDate": "2016-03-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:37.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:37.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:37.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JXVhfrmPfnCAYSTZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14006/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:37.600 [print] {
"resourceType": "Patient",
"id": "14006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:42.230+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUANA <b>SANZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164881</td></tr><tr><td>Date of birth</td><td><span>16 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOYA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164881"
}
],
"name": [
{
"use": "anonymous",
"text": "JUANA SANZ MOYA",
"family": "SANZ",
"given": [
"JUANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "afton99@shanahan.info"
},
{
"system": "phone",
"value": "34 (790) 801-8359"
}
],
"gender": "female",
"birthDate": "2016-03-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:37.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:38.272 [print] {
"resourceType": "Patient",
"id": "14006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:42.230+02:00",
"source": "#JXVhfrmPfnCAYSTZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUANA <b>SANZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164881</td></tr><tr><td>Date of birth</td><td><span>16 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOYA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164881"
}
],
"name": [
{
"use": "anonymous",
"text": "JUANA SANZ MOYA",
"family": "SANZ",
"given": [
"JUANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "afton99@shanahan.info"
},
{
"system": "phone",
"value": "34 (790) 801-8359"
}
],
"gender": "female",
"birthDate": "2016-03-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:38.858 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:39.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:43.529+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:43.529+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:39.754 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100706"
}
],
"name": [
{
"use": "anonymous",
"text": "MIGUEL ANGEL ROMERO RUIZ",
"family": "ROMERO",
"given": [
"MIGUEL ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "elyse.barrows@lang.biz"
},
{
"system": "phone",
"value": "34 (379) 205-0505"
}
],
"gender": "male",
"birthDate": "2016-06-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:40.392 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:40.392 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3zA75T7qEdDqd202"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14007/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:40.392 [print] {
"resourceType": "Patient",
"id": "14007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:45.040+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIGUEL ANGEL <b>ROMERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100706</td></tr><tr><td>Date of birth</td><td><span>08 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100706"
}
],
"name": [
{
"use": "anonymous",
"text": "MIGUEL ANGEL ROMERO RUIZ",
"family": "ROMERO",
"given": [
"MIGUEL ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "elyse.barrows@lang.biz"
},
{
"system": "phone",
"value": "34 (379) 205-0505"
}
],
"gender": "male",
"birthDate": "2016-06-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:40.392 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:40.392 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:40.392 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3zA75T7qEdDqd202"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14007/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:40.392 [print] {
"resourceType": "Patient",
"id": "14007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:45.040+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIGUEL ANGEL <b>ROMERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100706</td></tr><tr><td>Date of birth</td><td><span>08 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100706"
}
],
"name": [
{
"use": "anonymous",
"text": "MIGUEL ANGEL ROMERO RUIZ",
"family": "ROMERO",
"given": [
"MIGUEL ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "elyse.barrows@lang.biz"
},
{
"system": "phone",
"value": "34 (379) 205-0505"
}
],
"gender": "male",
"birthDate": "2016-06-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:40.392 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:42.018 [print] {
"resourceType": "Patient",
"id": "14007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:45.040+02:00",
"source": "#3zA75T7qEdDqd202",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIGUEL ANGEL <b>ROMERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100706</td></tr><tr><td>Date of birth</td><td><span>08 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100706"
}
],
"name": [
{
"use": "anonymous",
"text": "MIGUEL ANGEL ROMERO RUIZ",
"family": "ROMERO",
"given": [
"MIGUEL ANGEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "elyse.barrows@lang.biz"
},
{
"system": "phone",
"value": "34 (379) 205-0505"
}
],
"gender": "male",
"birthDate": "2016-06-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:42.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:43.254 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:47.289+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:47.289+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:43.254 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMIREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "159445"
}
],
"name": [
{
"use": "anonymous",
"text": "MANUELA GIL RAMIREZ",
"family": "GIL",
"given": [
"MANUELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jose88@bechtelar.net"
},
{
"system": "phone",
"value": "34 (525) 439-6189"
}
],
"gender": "female",
"birthDate": "2016-11-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:43.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:43.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sMTXIk5ABndmeL8k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14008/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:43.856 [print] {
"resourceType": "Patient",
"id": "14008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:48.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MANUELA <b>GIL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>159445</td></tr><tr><td>Date of birth</td><td><span>04 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMIREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "159445"
}
],
"name": [
{
"use": "anonymous",
"text": "MANUELA GIL RAMIREZ",
"family": "GIL",
"given": [
"MANUELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jose88@bechtelar.net"
},
{
"system": "phone",
"value": "34 (525) 439-6189"
}
],
"gender": "female",
"birthDate": "2016-11-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:43.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:43.871 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:43.871 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sMTXIk5ABndmeL8k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14008/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:43.871 [print] {
"resourceType": "Patient",
"id": "14008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:48.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MANUELA <b>GIL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>159445</td></tr><tr><td>Date of birth</td><td><span>04 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMIREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "159445"
}
],
"name": [
{
"use": "anonymous",
"text": "MANUELA GIL RAMIREZ",
"family": "GIL",
"given": [
"MANUELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jose88@bechtelar.net"
},
{
"system": "phone",
"value": "34 (525) 439-6189"
}
],
"gender": "female",
"birthDate": "2016-11-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:43.871 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:44.530 [print] {
"resourceType": "Patient",
"id": "14008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:48.517+02:00",
"source": "#sMTXIk5ABndmeL8k",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MANUELA <b>GIL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>159445</td></tr><tr><td>Date of birth</td><td><span>04 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMIREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "159445"
}
],
"name": [
{
"use": "anonymous",
"text": "MANUELA GIL RAMIREZ",
"family": "GIL",
"given": [
"MANUELA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jose88@bechtelar.net"
},
{
"system": "phone",
"value": "34 (525) 439-6189"
}
],
"gender": "female",
"birthDate": "2016-11-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:45.115 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:45.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:49.784+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:49.784+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:45.682 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DELGADO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "64717"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEX DURAN DELGADO",
"family": "DURAN",
"given": [
"ALEX"
]
}
],
"telecom": [
{
"system": "email",
"value": "adrien77@jacobson.net"
},
{
"system": "phone",
"value": "34 (854) 533-5333"
}
],
"gender": "male",
"birthDate": "2016-11-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:46.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:46.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tdevds4RBGwiVzG6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14009/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:46.305 [print] {
"resourceType": "Patient",
"id": "14009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:50.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEX <b>DURAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>64717</td></tr><tr><td>Date of birth</td><td><span>17 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DELGADO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "64717"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEX DURAN DELGADO",
"family": "DURAN",
"given": [
"ALEX"
]
}
],
"telecom": [
{
"system": "email",
"value": "adrien77@jacobson.net"
},
{
"system": "phone",
"value": "34 (854) 533-5333"
}
],
"gender": "male",
"birthDate": "2016-11-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:46.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:46.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:46.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tdevds4RBGwiVzG6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14009/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:46.305 [print] {
"resourceType": "Patient",
"id": "14009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:50.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEX <b>DURAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>64717</td></tr><tr><td>Date of birth</td><td><span>17 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DELGADO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "64717"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEX DURAN DELGADO",
"family": "DURAN",
"given": [
"ALEX"
]
}
],
"telecom": [
{
"system": "email",
"value": "adrien77@jacobson.net"
},
{
"system": "phone",
"value": "34 (854) 533-5333"
}
],
"gender": "male",
"birthDate": "2016-11-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:46.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:46.923 [print] {
"resourceType": "Patient",
"id": "14009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:50.938+02:00",
"source": "#tdevds4RBGwiVzG6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEX <b>DURAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>64717</td></tr><tr><td>Date of birth</td><td><span>17 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DELGADO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "64717"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEX DURAN DELGADO",
"family": "DURAN",
"given": [
"ALEX"
]
}
],
"telecom": [
{
"system": "email",
"value": "adrien77@jacobson.net"
},
{
"system": "phone",
"value": "34 (854) 533-5333"
}
],
"gender": "male",
"birthDate": "2016-11-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:47.545 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:48.150 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:52.208+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:52.208+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:48.150 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "160118"
}
],
"name": [
{
"use": "anonymous",
"text": "HECTOR SANTIAGO DIEZ",
"family": "SANTIAGO",
"given": [
"HECTOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "brandi.pagac@hotmail.com"
},
{
"system": "phone",
"value": "34 (710) 405-2402"
}
],
"gender": "male",
"birthDate": "2017-05-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:48.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:48.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UBfSeukmqMeuhLpq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14010/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:48.821 [print] {
"resourceType": "Patient",
"id": "14010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:53.464+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">HECTOR <b>SANTIAGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>160118</td></tr><tr><td>Date of birth</td><td><span>03 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "160118"
}
],
"name": [
{
"use": "anonymous",
"text": "HECTOR SANTIAGO DIEZ",
"family": "SANTIAGO",
"given": [
"HECTOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "brandi.pagac@hotmail.com"
},
{
"system": "phone",
"value": "34 (710) 405-2402"
}
],
"gender": "male",
"birthDate": "2017-05-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:48.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:48.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:48.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UBfSeukmqMeuhLpq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14010/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:48.821 [print] {
"resourceType": "Patient",
"id": "14010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:53.464+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">HECTOR <b>SANTIAGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>160118</td></tr><tr><td>Date of birth</td><td><span>03 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "160118"
}
],
"name": [
{
"use": "anonymous",
"text": "HECTOR SANTIAGO DIEZ",
"family": "SANTIAGO",
"given": [
"HECTOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "brandi.pagac@hotmail.com"
},
{
"system": "phone",
"value": "34 (710) 405-2402"
}
],
"gender": "male",
"birthDate": "2017-05-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:48.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:50.395 [print] {
"resourceType": "Patient",
"id": "14010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:53.464+02:00",
"source": "#UBfSeukmqMeuhLpq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">HECTOR <b>SANTIAGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>160118</td></tr><tr><td>Date of birth</td><td><span>03 May 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "160118"
}
],
"name": [
{
"use": "anonymous",
"text": "HECTOR SANTIAGO DIEZ",
"family": "SANTIAGO",
"given": [
"HECTOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "brandi.pagac@hotmail.com"
},
{
"system": "phone",
"value": "34 (710) 405-2402"
}
],
"gender": "male",
"birthDate": "2017-05-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:51.200 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:52.040 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:55.861+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:55.861+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:52.040 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MONTERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "56401"
}
],
"name": [
{
"use": "anonymous",
"text": "ROCIO CORTES MONTERO",
"family": "CORTES",
"given": [
"ROCIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "kwunsch@daugherty.com"
},
{
"system": "phone",
"value": "34 (881) 206-7291"
}
],
"gender": "female",
"birthDate": "2017-08-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:52.659 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:52.659 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9AYa7zkbwSWYnEFH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14011/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:52.659 [print] {
"resourceType": "Patient",
"id": "14011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:57.308+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROCIO <b>CORTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>56401</td></tr><tr><td>Date of birth</td><td><span>11 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MONTERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "56401"
}
],
"name": [
{
"use": "anonymous",
"text": "ROCIO CORTES MONTERO",
"family": "CORTES",
"given": [
"ROCIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "kwunsch@daugherty.com"
},
{
"system": "phone",
"value": "34 (881) 206-7291"
}
],
"gender": "female",
"birthDate": "2017-08-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:52.659 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:52.659 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:52.659 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9AYa7zkbwSWYnEFH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14011/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:52.659 [print] {
"resourceType": "Patient",
"id": "14011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:57.308+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROCIO <b>CORTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>56401</td></tr><tr><td>Date of birth</td><td><span>11 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MONTERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "56401"
}
],
"name": [
{
"use": "anonymous",
"text": "ROCIO CORTES MONTERO",
"family": "CORTES",
"given": [
"ROCIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "kwunsch@daugherty.com"
},
{
"system": "phone",
"value": "34 (881) 206-7291"
}
],
"gender": "female",
"birthDate": "2017-08-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:52.659 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:53.278 [print] {
"resourceType": "Patient",
"id": "14011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:57.308+02:00",
"source": "#9AYa7zkbwSWYnEFH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROCIO <b>CORTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>56401</td></tr><tr><td>Date of birth</td><td><span>11 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MONTERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "56401"
}
],
"name": [
{
"use": "anonymous",
"text": "ROCIO CORTES MONTERO",
"family": "CORTES",
"given": [
"ROCIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "kwunsch@daugherty.com"
},
{
"system": "phone",
"value": "34 (881) 206-7291"
}
],
"gender": "female",
"birthDate": "2017-08-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:53.911 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:54.550 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:37:58.586+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:37:58.586+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:54.550 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "TORRES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "38890"
}
],
"name": [
{
"use": "anonymous",
"text": "JAVIER SANCHEZ TORRES",
"family": "SANCHEZ",
"given": [
"JAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "orlando61@hotmail.com"
},
{
"system": "phone",
"value": "34 (911) 335-1575"
}
],
"gender": "male",
"birthDate": "2017-12-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:55.214 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:55.214 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3wWKanMNyYtyAgOo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14012/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:55.214 [print] {
"resourceType": "Patient",
"id": "14012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:59.863+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JAVIER <b>SANCHEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>38890</td></tr><tr><td>Date of birth</td><td><span>14 December 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "TORRES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "38890"
}
],
"name": [
{
"use": "anonymous",
"text": "JAVIER SANCHEZ TORRES",
"family": "SANCHEZ",
"given": [
"JAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "orlando61@hotmail.com"
},
{
"system": "phone",
"value": "34 (911) 335-1575"
}
],
"gender": "male",
"birthDate": "2017-12-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:55.214 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:55.214 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:55.214 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3wWKanMNyYtyAgOo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14012/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:37:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:37:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:55.214 [print] {
"resourceType": "Patient",
"id": "14012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:59.863+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JAVIER <b>SANCHEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>38890</td></tr><tr><td>Date of birth</td><td><span>14 December 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "TORRES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "38890"
}
],
"name": [
{
"use": "anonymous",
"text": "JAVIER SANCHEZ TORRES",
"family": "SANCHEZ",
"given": [
"JAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "orlando61@hotmail.com"
},
{
"system": "phone",
"value": "34 (911) 335-1575"
}
],
"gender": "male",
"birthDate": "2017-12-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:55.214 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:55.842 [print] {
"resourceType": "Patient",
"id": "14012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:37:59.863+02:00",
"source": "#3wWKanMNyYtyAgOo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JAVIER <b>SANCHEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>38890</td></tr><tr><td>Date of birth</td><td><span>14 December 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "TORRES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "38890"
}
],
"name": [
{
"use": "anonymous",
"text": "JAVIER SANCHEZ TORRES",
"family": "SANCHEZ",
"given": [
"JAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "orlando61@hotmail.com"
},
{
"system": "phone",
"value": "34 (911) 335-1575"
}
],
"gender": "male",
"birthDate": "2017-12-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:56.482 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:37:57.103 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:01.151+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:01.151+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:37:57.119 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BLANCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "34421"
}
],
"name": [
{
"use": "anonymous",
"text": "CONSUELO SAEZ BLANCO",
"family": "SAEZ",
"given": [
"CONSUELO"
]
}
],
"telecom": [
{
"system": "email",
"value": "chester.dare@yahoo.com"
},
{
"system": "phone",
"value": "34 (559) 955-6264"
}
],
"gender": "female",
"birthDate": "2017-12-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:57.858 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"794"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:57.858 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lzbkREmCChl0X6Jk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14013/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:57.858 [print] {
"resourceType": "Patient",
"id": "14013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:02.483+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CONSUELO <b>SAEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>34421</td></tr><tr><td>Date of birth</td><td><span>25 December 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BLANCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "34421"
}
],
"name": [
{
"use": "anonymous",
"text": "CONSUELO SAEZ BLANCO",
"family": "SAEZ",
"given": [
"CONSUELO"
]
}
],
"telecom": [
{
"system": "email",
"value": "chester.dare@yahoo.com"
},
{
"system": "phone",
"value": "34 (559) 955-6264"
}
],
"gender": "female",
"birthDate": "2017-12-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:57.858 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:37:57.858 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"794"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:37:57.858 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lzbkREmCChl0X6Jk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14013/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:37:57.858 [print] {
"resourceType": "Patient",
"id": "14013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:02.483+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CONSUELO <b>SAEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>34421</td></tr><tr><td>Date of birth</td><td><span>25 December 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BLANCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "34421"
}
],
"name": [
{
"use": "anonymous",
"text": "CONSUELO SAEZ BLANCO",
"family": "SAEZ",
"given": [
"CONSUELO"
]
}
],
"telecom": [
{
"system": "email",
"value": "chester.dare@yahoo.com"
},
{
"system": "phone",
"value": "34 (559) 955-6264"
}
],
"gender": "female",
"birthDate": "2017-12-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:37:57.858 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:37:58.659 [print] {
"resourceType": "Patient",
"id": "14013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:02.483+02:00",
"source": "#lzbkREmCChl0X6Jk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CONSUELO <b>SAEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>34421</td></tr><tr><td>Date of birth</td><td><span>25 December 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BLANCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "34421"
}
],
"name": [
{
"use": "anonymous",
"text": "CONSUELO SAEZ BLANCO",
"family": "SAEZ",
"given": [
"CONSUELO"
]
}
],
"telecom": [
{
"system": "email",
"value": "chester.dare@yahoo.com"
},
{
"system": "phone",
"value": "34 (559) 955-6264"
}
],
"gender": "female",
"birthDate": "2017-12-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:37:59.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:00.004 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:04.018+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:04.018+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:00.004 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARCIA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40666"
}
],
"name": [
{
"use": "anonymous",
"text": "NEREA NIETO GARCIA",
"family": "NIETO",
"given": [
"NEREA"
]
}
],
"telecom": [
{
"system": "email",
"value": "monroe21@gmail.com"
},
{
"system": "phone",
"value": "34 (747) 210-2500"
}
],
"gender": "female",
"birthDate": "2012-10-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:00.656 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:00.656 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"syPLp6B5xF6UnfCW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14014/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:00.656 [print] {
"resourceType": "Patient",
"id": "14014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:05.294+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NEREA <b>NIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40666</td></tr><tr><td>Date of birth</td><td><span>18 October 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARCIA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40666"
}
],
"name": [
{
"use": "anonymous",
"text": "NEREA NIETO GARCIA",
"family": "NIETO",
"given": [
"NEREA"
]
}
],
"telecom": [
{
"system": "email",
"value": "monroe21@gmail.com"
},
{
"system": "phone",
"value": "34 (747) 210-2500"
}
],
"gender": "female",
"birthDate": "2012-10-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:00.656 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:00.656 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:00.656 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"syPLp6B5xF6UnfCW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14014/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:00.656 [print] {
"resourceType": "Patient",
"id": "14014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:05.294+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NEREA <b>NIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40666</td></tr><tr><td>Date of birth</td><td><span>18 October 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARCIA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40666"
}
],
"name": [
{
"use": "anonymous",
"text": "NEREA NIETO GARCIA",
"family": "NIETO",
"given": [
"NEREA"
]
}
],
"telecom": [
{
"system": "email",
"value": "monroe21@gmail.com"
},
{
"system": "phone",
"value": "34 (747) 210-2500"
}
],
"gender": "female",
"birthDate": "2012-10-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:00.656 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:01.265 [print] {
"resourceType": "Patient",
"id": "14014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:05.294+02:00",
"source": "#syPLp6B5xF6UnfCW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NEREA <b>NIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40666</td></tr><tr><td>Date of birth</td><td><span>18 October 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARCIA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40666"
}
],
"name": [
{
"use": "anonymous",
"text": "NEREA NIETO GARCIA",
"family": "NIETO",
"given": [
"NEREA"
]
}
],
"telecom": [
{
"system": "email",
"value": "monroe21@gmail.com"
},
{
"system": "phone",
"value": "34 (747) 210-2500"
}
],
"gender": "female",
"birthDate": "2012-10-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:02.190 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:03.087 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:06.849+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:06.849+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:03.087 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RIVERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "97857"
}
],
"name": [
{
"use": "anonymous",
"text": "FERNANDO RAMOS RIVERA",
"family": "RAMOS",
"given": [
"FERNANDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "okeefe.mabel@ritchie.com"
}
],
"gender": "male",
"birthDate": "2013-04-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:03.751 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"749"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:03.751 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zU1hQgucd6i5GFPw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14015/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:03.751 [print] {
"resourceType": "Patient",
"id": "14015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:08.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FERNANDO <b>RAMOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>97857</td></tr><tr><td>Date of birth</td><td><span>30 April 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RIVERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "97857"
}
],
"name": [
{
"use": "anonymous",
"text": "FERNANDO RAMOS RIVERA",
"family": "RAMOS",
"given": [
"FERNANDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "okeefe.mabel@ritchie.com"
}
],
"gender": "male",
"birthDate": "2013-04-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:03.751 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:03.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"749"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:03.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zU1hQgucd6i5GFPw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14015/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:03.766 [print] {
"resourceType": "Patient",
"id": "14015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:08.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FERNANDO <b>RAMOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>97857</td></tr><tr><td>Date of birth</td><td><span>30 April 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RIVERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "97857"
}
],
"name": [
{
"use": "anonymous",
"text": "FERNANDO RAMOS RIVERA",
"family": "RAMOS",
"given": [
"FERNANDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "okeefe.mabel@ritchie.com"
}
],
"gender": "male",
"birthDate": "2013-04-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:03.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:04.372 [print] {
"resourceType": "Patient",
"id": "14015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:08.382+02:00",
"source": "#zU1hQgucd6i5GFPw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FERNANDO <b>RAMOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>97857</td></tr><tr><td>Date of birth</td><td><span>30 April 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RIVERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "97857"
}
],
"name": [
{
"use": "anonymous",
"text": "FERNANDO RAMOS RIVERA",
"family": "RAMOS",
"given": [
"FERNANDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "okeefe.mabel@ritchie.com"
}
],
"gender": "male",
"birthDate": "2013-04-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:06.164 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:06.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:10.835+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:10.835+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:06.834 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANCHEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "128773"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MANUEL MUÑOZ SANCHEZ",
"family": "MUÑOZ",
"given": [
"JOSE MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "tremayne.osinski@gmail.com"
},
{
"system": "phone",
"value": "34 (753) 799-5912"
}
],
"gender": "male",
"birthDate": "2013-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:07.999 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:07.999 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zsh6tf0kR2yEZLy1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14016/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:07.999 [print] {
"resourceType": "Patient",
"id": "14016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:12.656+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MANUEL <b>MUÑOZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>128773</td></tr><tr><td>Date of birth</td><td><span>01 May 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANCHEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "128773"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MANUEL MUÑOZ SANCHEZ",
"family": "MUÑOZ",
"given": [
"JOSE MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "tremayne.osinski@gmail.com"
},
{
"system": "phone",
"value": "34 (753) 799-5912"
}
],
"gender": "male",
"birthDate": "2013-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:07.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:08.015 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:08.015 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zsh6tf0kR2yEZLy1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14016/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:08.015 [print] {
"resourceType": "Patient",
"id": "14016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:12.656+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MANUEL <b>MUÑOZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>128773</td></tr><tr><td>Date of birth</td><td><span>01 May 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANCHEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "128773"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MANUEL MUÑOZ SANCHEZ",
"family": "MUÑOZ",
"given": [
"JOSE MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "tremayne.osinski@gmail.com"
},
{
"system": "phone",
"value": "34 (753) 799-5912"
}
],
"gender": "male",
"birthDate": "2013-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:08.015 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:08.855 [print] {
"resourceType": "Patient",
"id": "14016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:12.656+02:00",
"source": "#zsh6tf0kR2yEZLy1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MANUEL <b>MUÑOZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>128773</td></tr><tr><td>Date of birth</td><td><span>01 May 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANCHEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "128773"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MANUEL MUÑOZ SANCHEZ",
"family": "MUÑOZ",
"given": [
"JOSE MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "tremayne.osinski@gmail.com"
},
{
"system": "phone",
"value": "34 (753) 799-5912"
}
],
"gender": "male",
"birthDate": "2013-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:09.476 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:10.124 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:14.137+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:14.137+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:10.139 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLEGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "70846"
}
],
"name": [
{
"use": "anonymous",
"text": "CAROLINA SANTANA GALLEGO",
"family": "SANTANA",
"given": [
"CAROLINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jerome04@weber.com"
},
{
"system": "phone",
"value": "34 (331) 363-4656"
}
],
"gender": "female",
"birthDate": "2013-07-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:10.763 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:10.763 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kkDOxZKv1yUzMsC3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14017/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:10.763 [print] {
"resourceType": "Patient",
"id": "14017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:15.394+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CAROLINA <b>SANTANA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>70846</td></tr><tr><td>Date of birth</td><td><span>18 July 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLEGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "70846"
}
],
"name": [
{
"use": "anonymous",
"text": "CAROLINA SANTANA GALLEGO",
"family": "SANTANA",
"given": [
"CAROLINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jerome04@weber.com"
},
{
"system": "phone",
"value": "34 (331) 363-4656"
}
],
"gender": "female",
"birthDate": "2013-07-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:10.763 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:10.763 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:10.763 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kkDOxZKv1yUzMsC3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14017/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:10.763 [print] {
"resourceType": "Patient",
"id": "14017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:15.394+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CAROLINA <b>SANTANA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>70846</td></tr><tr><td>Date of birth</td><td><span>18 July 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLEGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "70846"
}
],
"name": [
{
"use": "anonymous",
"text": "CAROLINA SANTANA GALLEGO",
"family": "SANTANA",
"given": [
"CAROLINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jerome04@weber.com"
},
{
"system": "phone",
"value": "34 (331) 363-4656"
}
],
"gender": "female",
"birthDate": "2013-07-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:10.763 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:11.669 [print] {
"resourceType": "Patient",
"id": "14017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:15.394+02:00",
"source": "#kkDOxZKv1yUzMsC3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CAROLINA <b>SANTANA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>70846</td></tr><tr><td>Date of birth</td><td><span>18 July 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLEGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "70846"
}
],
"name": [
{
"use": "anonymous",
"text": "CAROLINA SANTANA GALLEGO",
"family": "SANTANA",
"given": [
"CAROLINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jerome04@weber.com"
},
{
"system": "phone",
"value": "34 (331) 363-4656"
}
],
"gender": "female",
"birthDate": "2013-07-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:12.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:12.919 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:16.949+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:16.949+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:12.919 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DOMINGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40868"
}
],
"name": [
{
"use": "anonymous",
"text": "AITOR LORENZO DOMINGUEZ",
"family": "LORENZO",
"given": [
"AITOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "bernita.stehr@crona.com"
},
{
"system": "phone",
"value": "34 (732) 454-0645"
}
],
"gender": "male",
"birthDate": "2013-08-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:13.581 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:13.581 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"73HbTA1YmeF9ch0T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14018/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:13.581 [print] {
"resourceType": "Patient",
"id": "14018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:18.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AITOR <b>LORENZO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40868</td></tr><tr><td>Date of birth</td><td><span>21 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DOMINGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40868"
}
],
"name": [
{
"use": "anonymous",
"text": "AITOR LORENZO DOMINGUEZ",
"family": "LORENZO",
"given": [
"AITOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "bernita.stehr@crona.com"
},
{
"system": "phone",
"value": "34 (732) 454-0645"
}
],
"gender": "male",
"birthDate": "2013-08-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:13.581 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:13.581 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:13.581 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"73HbTA1YmeF9ch0T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14018/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:13.581 [print] {
"resourceType": "Patient",
"id": "14018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:18.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AITOR <b>LORENZO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40868</td></tr><tr><td>Date of birth</td><td><span>21 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DOMINGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40868"
}
],
"name": [
{
"use": "anonymous",
"text": "AITOR LORENZO DOMINGUEZ",
"family": "LORENZO",
"given": [
"AITOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "bernita.stehr@crona.com"
},
{
"system": "phone",
"value": "34 (732) 454-0645"
}
],
"gender": "male",
"birthDate": "2013-08-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:13.581 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:14.183 [print] {
"resourceType": "Patient",
"id": "14018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:18.229+02:00",
"source": "#73HbTA1YmeF9ch0T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AITOR <b>LORENZO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40868</td></tr><tr><td>Date of birth</td><td><span>21 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DOMINGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40868"
}
],
"name": [
{
"use": "anonymous",
"text": "AITOR LORENZO DOMINGUEZ",
"family": "LORENZO",
"given": [
"AITOR"
]
}
],
"telecom": [
{
"system": "email",
"value": "bernita.stehr@crona.com"
},
{
"system": "phone",
"value": "34 (732) 454-0645"
}
],
"gender": "male",
"birthDate": "2013-08-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:14.776 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:15.575 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:19.440+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:19.440+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:15.575 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9398"
}
],
"name": [
{
"use": "anonymous",
"text": "RODRIGO PASTOR CABRERA",
"family": "PASTOR",
"given": [
"RODRIGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "orn.eleanore@wilderman.biz"
},
{
"system": "phone",
"value": "34 (363) 420-7648"
}
],
"gender": "male",
"birthDate": "2014-01-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:16.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:16.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a2UUe5RvIqO7Iy88"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14019/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:16.415 [print] {
"resourceType": "Patient",
"id": "14019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:21.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RODRIGO <b>PASTOR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9398</td></tr><tr><td>Date of birth</td><td><span>29 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9398"
}
],
"name": [
{
"use": "anonymous",
"text": "RODRIGO PASTOR CABRERA",
"family": "PASTOR",
"given": [
"RODRIGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "orn.eleanore@wilderman.biz"
},
{
"system": "phone",
"value": "34 (363) 420-7648"
}
],
"gender": "male",
"birthDate": "2014-01-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:16.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:16.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:16.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a2UUe5RvIqO7Iy88"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14019/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:16.415 [print] {
"resourceType": "Patient",
"id": "14019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:21.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RODRIGO <b>PASTOR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9398</td></tr><tr><td>Date of birth</td><td><span>29 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9398"
}
],
"name": [
{
"use": "anonymous",
"text": "RODRIGO PASTOR CABRERA",
"family": "PASTOR",
"given": [
"RODRIGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "orn.eleanore@wilderman.biz"
},
{
"system": "phone",
"value": "34 (363) 420-7648"
}
],
"gender": "male",
"birthDate": "2014-01-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:16.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:17.005 [print] {
"resourceType": "Patient",
"id": "14019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:21.060+02:00",
"source": "#a2UUe5RvIqO7Iy88",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RODRIGO <b>PASTOR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9398</td></tr><tr><td>Date of birth</td><td><span>29 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9398"
}
],
"name": [
{
"use": "anonymous",
"text": "RODRIGO PASTOR CABRERA",
"family": "PASTOR",
"given": [
"RODRIGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "orn.eleanore@wilderman.biz"
},
{
"system": "phone",
"value": "34 (363) 420-7648"
}
],
"gender": "male",
"birthDate": "2014-01-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:19.097 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:19.714 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:23.751+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:23.751+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:19.729 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BLANCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "53442"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE IGNACIO SAEZ BLANCO",
"family": "SAEZ",
"given": [
"JOSE IGNACIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "ethel46@gmail.com"
},
{
"system": "phone",
"value": "34 (448) 304-6903"
}
],
"gender": "male",
"birthDate": "2014-05-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:20.334 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:20.334 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aSl81jS2brltpmZo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14020/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:20.334 [print] {
"resourceType": "Patient",
"id": "14020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:24.989+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE IGNACIO <b>SAEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>53442</td></tr><tr><td>Date of birth</td><td><span>20 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BLANCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "53442"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE IGNACIO SAEZ BLANCO",
"family": "SAEZ",
"given": [
"JOSE IGNACIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "ethel46@gmail.com"
},
{
"system": "phone",
"value": "34 (448) 304-6903"
}
],
"gender": "male",
"birthDate": "2014-05-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:20.334 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:20.334 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:20.334 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aSl81jS2brltpmZo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14020/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:20.334 [print] {
"resourceType": "Patient",
"id": "14020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:24.989+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE IGNACIO <b>SAEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>53442</td></tr><tr><td>Date of birth</td><td><span>20 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BLANCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "53442"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE IGNACIO SAEZ BLANCO",
"family": "SAEZ",
"given": [
"JOSE IGNACIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "ethel46@gmail.com"
},
{
"system": "phone",
"value": "34 (448) 304-6903"
}
],
"gender": "male",
"birthDate": "2014-05-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:20.334 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:20.964 [print] {
"resourceType": "Patient",
"id": "14020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:24.989+02:00",
"source": "#aSl81jS2brltpmZo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE IGNACIO <b>SAEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>53442</td></tr><tr><td>Date of birth</td><td><span>20 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BLANCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "53442"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE IGNACIO SAEZ BLANCO",
"family": "SAEZ",
"given": [
"JOSE IGNACIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "ethel46@gmail.com"
},
{
"system": "phone",
"value": "34 (448) 304-6903"
}
],
"gender": "male",
"birthDate": "2014-05-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:21.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:22.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:26.241+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:26.241+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:22.196 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NUÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "5831"
}
],
"name": [
{
"use": "anonymous",
"text": "RUBEN ORTIZ NUÑEZ",
"family": "ORTIZ",
"given": [
"RUBEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "colleen15@hotmail.com"
},
{
"system": "phone",
"value": "34 (773) 551-7623"
}
],
"gender": "male",
"birthDate": "2014-09-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:22.814 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:22.814 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W8DH7w3l4lqOayIR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14021/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14021/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:22.814 [print] {
"resourceType": "Patient",
"id": "14021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:27.461+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RUBEN <b>ORTIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>5831</td></tr><tr><td>Date of birth</td><td><span>22 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NUÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "5831"
}
],
"name": [
{
"use": "anonymous",
"text": "RUBEN ORTIZ NUÑEZ",
"family": "ORTIZ",
"given": [
"RUBEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "colleen15@hotmail.com"
},
{
"system": "phone",
"value": "34 (773) 551-7623"
}
],
"gender": "male",
"birthDate": "2014-09-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:22.814 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:22.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:22.818 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W8DH7w3l4lqOayIR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14021/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14021/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:22.818 [print] {
"resourceType": "Patient",
"id": "14021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:27.461+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RUBEN <b>ORTIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>5831</td></tr><tr><td>Date of birth</td><td><span>22 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NUÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "5831"
}
],
"name": [
{
"use": "anonymous",
"text": "RUBEN ORTIZ NUÑEZ",
"family": "ORTIZ",
"given": [
"RUBEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "colleen15@hotmail.com"
},
{
"system": "phone",
"value": "34 (773) 551-7623"
}
],
"gender": "male",
"birthDate": "2014-09-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:22.818 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:23.393 [print] {
"resourceType": "Patient",
"id": "14021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:27.461+02:00",
"source": "#W8DH7w3l4lqOayIR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RUBEN <b>ORTIZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>5831</td></tr><tr><td>Date of birth</td><td><span>22 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NUÑEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "5831"
}
],
"name": [
{
"use": "anonymous",
"text": "RUBEN ORTIZ NUÑEZ",
"family": "ORTIZ",
"given": [
"RUBEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "colleen15@hotmail.com"
},
{
"system": "phone",
"value": "34 (773) 551-7623"
}
],
"gender": "male",
"birthDate": "2014-09-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:24.033 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:25.666 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:28.700+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:28.700+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:25.668 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARRASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "60362"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ANTONIA VICENTE CARRASCO",
"family": "VICENTE",
"given": [
"MARIA ANTONIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "milan37@skiles.org"
},
{
"system": "phone",
"value": "34 (421) 608-8189"
}
],
"gender": "female",
"birthDate": "2015-04-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:26.268 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:26.268 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V0D0wXwA8Y24qNAh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14022/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14022/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:26.268 [print] {
"resourceType": "Patient",
"id": "14022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:30.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ANTONIA <b>VICENTE </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>60362</td></tr><tr><td>Date of birth</td><td><span>21 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARRASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "60362"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ANTONIA VICENTE CARRASCO",
"family": "VICENTE",
"given": [
"MARIA ANTONIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "milan37@skiles.org"
},
{
"system": "phone",
"value": "34 (421) 608-8189"
}
],
"gender": "female",
"birthDate": "2015-04-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:26.268 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:26.268 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:26.268 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V0D0wXwA8Y24qNAh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14022/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14022/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:26.268 [print] {
"resourceType": "Patient",
"id": "14022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:30.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ANTONIA <b>VICENTE </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>60362</td></tr><tr><td>Date of birth</td><td><span>21 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARRASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "60362"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ANTONIA VICENTE CARRASCO",
"family": "VICENTE",
"given": [
"MARIA ANTONIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "milan37@skiles.org"
},
{
"system": "phone",
"value": "34 (421) 608-8189"
}
],
"gender": "female",
"birthDate": "2015-04-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:26.268 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:27.101 [print] {
"resourceType": "Patient",
"id": "14022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:30.920+02:00",
"source": "#V0D0wXwA8Y24qNAh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ANTONIA <b>VICENTE </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>60362</td></tr><tr><td>Date of birth</td><td><span>21 April 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARRASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "60362"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ANTONIA VICENTE CARRASCO",
"family": "VICENTE",
"given": [
"MARIA ANTONIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "milan37@skiles.org"
},
{
"system": "phone",
"value": "34 (421) 608-8189"
}
],
"gender": "female",
"birthDate": "2015-04-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:27.919 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:28.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:32.590+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:32.590+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:28.536 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASTOR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "202767"
}
],
"name": [
{
"use": "anonymous",
"text": "MERCEDES BLANCO PASTOR",
"family": "BLANCO",
"given": [
"MERCEDES"
]
}
],
"telecom": [
{
"system": "email",
"value": "margie40@fisher.com"
},
{
"system": "phone",
"value": "34 (897) 764-4029"
}
],
"gender": "female",
"birthDate": "2015-05-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:29.376 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:29.376 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eBibA7f2VH8zamRN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14023/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14023/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:29.376 [print] {
"resourceType": "Patient",
"id": "14023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:34.033+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MERCEDES <b>BLANCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>202767</td></tr><tr><td>Date of birth</td><td><span>06 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASTOR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "202767"
}
],
"name": [
{
"use": "anonymous",
"text": "MERCEDES BLANCO PASTOR",
"family": "BLANCO",
"given": [
"MERCEDES"
]
}
],
"telecom": [
{
"system": "email",
"value": "margie40@fisher.com"
},
{
"system": "phone",
"value": "34 (897) 764-4029"
}
],
"gender": "female",
"birthDate": "2015-05-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:29.376 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:29.392 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:29.392 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eBibA7f2VH8zamRN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14023/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14023/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:29.392 [print] {
"resourceType": "Patient",
"id": "14023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:34.033+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MERCEDES <b>BLANCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>202767</td></tr><tr><td>Date of birth</td><td><span>06 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASTOR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "202767"
}
],
"name": [
{
"use": "anonymous",
"text": "MERCEDES BLANCO PASTOR",
"family": "BLANCO",
"given": [
"MERCEDES"
]
}
],
"telecom": [
{
"system": "email",
"value": "margie40@fisher.com"
},
{
"system": "phone",
"value": "34 (897) 764-4029"
}
],
"gender": "female",
"birthDate": "2015-05-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:29.392 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:29.994 [print] {
"resourceType": "Patient",
"id": "14023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:34.033+02:00",
"source": "#eBibA7f2VH8zamRN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MERCEDES <b>BLANCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>202767</td></tr><tr><td>Date of birth</td><td><span>06 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASTOR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "202767"
}
],
"name": [
{
"use": "anonymous",
"text": "MERCEDES BLANCO PASTOR",
"family": "BLANCO",
"given": [
"MERCEDES"
]
}
],
"telecom": [
{
"system": "email",
"value": "margie40@fisher.com"
},
{
"system": "phone",
"value": "34 (897) 764-4029"
}
],
"gender": "female",
"birthDate": "2015-05-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:31.604 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:33.815 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:36.278+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:36.278+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:33.815 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "83556"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN ANTONIO DELGADO ORTEGA",
"family": "DELGADO",
"given": [
"JUAN ANTONIO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (594) 262-3532"
}
],
"gender": "male",
"birthDate": "2015-05-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:34.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"754"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:34.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qtryeUniUEDkNizn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14024/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14024/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:34.472 [print] {
"resourceType": "Patient",
"id": "14024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:39.111+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN ANTONIO <b>DELGADO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>83556</td></tr><tr><td>Date of birth</td><td><span>08 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "83556"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN ANTONIO DELGADO ORTEGA",
"family": "DELGADO",
"given": [
"JUAN ANTONIO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (594) 262-3532"
}
],
"gender": "male",
"birthDate": "2015-05-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:34.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:34.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"754"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:34.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qtryeUniUEDkNizn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14024/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14024/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:34.472 [print] {
"resourceType": "Patient",
"id": "14024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:39.111+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN ANTONIO <b>DELGADO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>83556</td></tr><tr><td>Date of birth</td><td><span>08 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "83556"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN ANTONIO DELGADO ORTEGA",
"family": "DELGADO",
"given": [
"JUAN ANTONIO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (594) 262-3532"
}
],
"gender": "male",
"birthDate": "2015-05-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:34.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:35.096 [print] {
"resourceType": "Patient",
"id": "14024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:39.111+02:00",
"source": "#qtryeUniUEDkNizn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN ANTONIO <b>DELGADO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>83556</td></tr><tr><td>Date of birth</td><td><span>08 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "83556"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN ANTONIO DELGADO ORTEGA",
"family": "DELGADO",
"given": [
"JUAN ANTONIO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (594) 262-3532"
}
],
"gender": "male",
"birthDate": "2015-05-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:35.713 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:36.314 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:40.388+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:40.388+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:36.314 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "76006"
}
],
"name": [
{
"use": "anonymous",
"text": "EVA VIDAL HERRERA",
"family": "VIDAL",
"given": [
"EVA"
]
}
],
"telecom": [
{
"system": "email",
"value": "nickolas.keeling@langosh.com"
},
{
"system": "phone",
"value": "34 (861) 231-6672"
}
],
"gender": "female",
"birthDate": "2015-07-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:36.961 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"794"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:36.961 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4n6X6tkOvCM9HgBx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14025/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14025/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:36.961 [print] {
"resourceType": "Patient",
"id": "14025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:41.592+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EVA <b>VIDAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>76006</td></tr><tr><td>Date of birth</td><td><span>13 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "76006"
}
],
"name": [
{
"use": "anonymous",
"text": "EVA VIDAL HERRERA",
"family": "VIDAL",
"given": [
"EVA"
]
}
],
"telecom": [
{
"system": "email",
"value": "nickolas.keeling@langosh.com"
},
{
"system": "phone",
"value": "34 (861) 231-6672"
}
],
"gender": "female",
"birthDate": "2015-07-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:36.961 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:36.961 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"794"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:36.961 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4n6X6tkOvCM9HgBx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14025/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14025/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:36.961 [print] {
"resourceType": "Patient",
"id": "14025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:41.592+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EVA <b>VIDAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>76006</td></tr><tr><td>Date of birth</td><td><span>13 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "76006"
}
],
"name": [
{
"use": "anonymous",
"text": "EVA VIDAL HERRERA",
"family": "VIDAL",
"given": [
"EVA"
]
}
],
"telecom": [
{
"system": "email",
"value": "nickolas.keeling@langosh.com"
},
{
"system": "phone",
"value": "34 (861) 231-6672"
}
],
"gender": "female",
"birthDate": "2015-07-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:36.961 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:37.547 [print] {
"resourceType": "Patient",
"id": "14025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:41.592+02:00",
"source": "#4n6X6tkOvCM9HgBx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">EVA <b>VIDAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>76006</td></tr><tr><td>Date of birth</td><td><span>13 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "76006"
}
],
"name": [
{
"use": "anonymous",
"text": "EVA VIDAL HERRERA",
"family": "VIDAL",
"given": [
"EVA"
]
}
],
"telecom": [
{
"system": "email",
"value": "nickolas.keeling@langosh.com"
},
{
"system": "phone",
"value": "34 (861) 231-6672"
}
],
"gender": "female",
"birthDate": "2015-07-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:38.217 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:38.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:42.888+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:42.888+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:38.803 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SUAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "77161"
}
],
"name": [
{
"use": "anonymous",
"text": "ISABEL PEREZ SUAREZ",
"family": "PEREZ",
"given": [
"ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "amparo.wisoky@krajcik.info"
},
{
"system": "phone",
"value": "34 (234) 348-9182"
}
],
"gender": "female",
"birthDate": "2015-10-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:39.429 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:39.429 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bY970SWhiESawha8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14026/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14026/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:39.429 [print] {
"resourceType": "Patient",
"id": "14026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:44.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ISABEL <b>PEREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>77161</td></tr><tr><td>Date of birth</td><td><span>23 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SUAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "77161"
}
],
"name": [
{
"use": "anonymous",
"text": "ISABEL PEREZ SUAREZ",
"family": "PEREZ",
"given": [
"ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "amparo.wisoky@krajcik.info"
},
{
"system": "phone",
"value": "34 (234) 348-9182"
}
],
"gender": "female",
"birthDate": "2015-10-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:39.429 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:39.431 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:39.431 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bY970SWhiESawha8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14026/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14026/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:39.431 [print] {
"resourceType": "Patient",
"id": "14026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:44.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ISABEL <b>PEREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>77161</td></tr><tr><td>Date of birth</td><td><span>23 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SUAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "77161"
}
],
"name": [
{
"use": "anonymous",
"text": "ISABEL PEREZ SUAREZ",
"family": "PEREZ",
"given": [
"ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "amparo.wisoky@krajcik.info"
},
{
"system": "phone",
"value": "34 (234) 348-9182"
}
],
"gender": "female",
"birthDate": "2015-10-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:39.431 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:41.227 [print] {
"resourceType": "Patient",
"id": "14026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:44.059+02:00",
"source": "#bY970SWhiESawha8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ISABEL <b>PEREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>77161</td></tr><tr><td>Date of birth</td><td><span>23 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SUAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "77161"
}
],
"name": [
{
"use": "anonymous",
"text": "ISABEL PEREZ SUAREZ",
"family": "PEREZ",
"given": [
"ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "amparo.wisoky@krajcik.info"
},
{
"system": "phone",
"value": "34 (234) 348-9182"
}
],
"gender": "female",
"birthDate": "2015-10-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:41.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:42.422 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:46.504+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:46.504+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:42.424 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BENITEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "199503"
}
],
"name": [
{
"use": "anonymous",
"text": "CLARA MOYA BENITEZ",
"family": "MOYA",
"given": [
"CLARA"
]
}
],
"telecom": [
{
"system": "email",
"value": "larson.billy@yahoo.com"
},
{
"system": "phone",
"value": "34 (367) 347-7753"
}
],
"gender": "female",
"birthDate": "2015-11-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:44.051 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:44.051 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mbU5Lu5A7MxXKMRD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14027/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14027/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:44.052 [print] {
"resourceType": "Patient",
"id": "14027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:48.689+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CLARA <b>MOYA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>199503</td></tr><tr><td>Date of birth</td><td><span>23 November 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BENITEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "199503"
}
],
"name": [
{
"use": "anonymous",
"text": "CLARA MOYA BENITEZ",
"family": "MOYA",
"given": [
"CLARA"
]
}
],
"telecom": [
{
"system": "email",
"value": "larson.billy@yahoo.com"
},
{
"system": "phone",
"value": "34 (367) 347-7753"
}
],
"gender": "female",
"birthDate": "2015-11-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:44.052 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:44.054 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:44.054 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mbU5Lu5A7MxXKMRD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14027/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14027/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:44.054 [print] {
"resourceType": "Patient",
"id": "14027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:48.689+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CLARA <b>MOYA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>199503</td></tr><tr><td>Date of birth</td><td><span>23 November 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BENITEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "199503"
}
],
"name": [
{
"use": "anonymous",
"text": "CLARA MOYA BENITEZ",
"family": "MOYA",
"given": [
"CLARA"
]
}
],
"telecom": [
{
"system": "email",
"value": "larson.billy@yahoo.com"
},
{
"system": "phone",
"value": "34 (367) 347-7753"
}
],
"gender": "female",
"birthDate": "2015-11-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:44.054 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:44.918 [print] {
"resourceType": "Patient",
"id": "14027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:48.689+02:00",
"source": "#mbU5Lu5A7MxXKMRD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CLARA <b>MOYA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>199503</td></tr><tr><td>Date of birth</td><td><span>23 November 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BENITEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "199503"
}
],
"name": [
{
"use": "anonymous",
"text": "CLARA MOYA BENITEZ",
"family": "MOYA",
"given": [
"CLARA"
]
}
],
"telecom": [
{
"system": "email",
"value": "larson.billy@yahoo.com"
},
{
"system": "phone",
"value": "34 (367) 347-7753"
}
],
"gender": "female",
"birthDate": "2015-11-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:45.768 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:46.355 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:50.434+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:50.434+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:46.370 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GOMEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164437"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIO CARRASCO GOMEZ",
"family": "CARRASCO",
"given": [
"JULIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "zwitting@hotmail.com"
},
{
"system": "phone",
"value": "34 (724) 360-6453"
}
],
"gender": "male",
"birthDate": "2016-01-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:46.988 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:46.988 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oeBv7fdzQ6vYqk3C"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14028/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14028/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:46.988 [print] {
"resourceType": "Patient",
"id": "14028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:51.627+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIO <b>CARRASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164437</td></tr><tr><td>Date of birth</td><td><span>05 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GOMEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164437"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIO CARRASCO GOMEZ",
"family": "CARRASCO",
"given": [
"JULIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "zwitting@hotmail.com"
},
{
"system": "phone",
"value": "34 (724) 360-6453"
}
],
"gender": "male",
"birthDate": "2016-01-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:46.988 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:46.988 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:46.988 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oeBv7fdzQ6vYqk3C"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14028/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14028/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:46.988 [print] {
"resourceType": "Patient",
"id": "14028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:51.627+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIO <b>CARRASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164437</td></tr><tr><td>Date of birth</td><td><span>05 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GOMEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164437"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIO CARRASCO GOMEZ",
"family": "CARRASCO",
"given": [
"JULIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "zwitting@hotmail.com"
},
{
"system": "phone",
"value": "34 (724) 360-6453"
}
],
"gender": "male",
"birthDate": "2016-01-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:46.988 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:47.928 [print] {
"resourceType": "Patient",
"id": "14028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:51.627+02:00",
"source": "#oeBv7fdzQ6vYqk3C",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIO <b>CARRASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164437</td></tr><tr><td>Date of birth</td><td><span>05 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GOMEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164437"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIO CARRASCO GOMEZ",
"family": "CARRASCO",
"given": [
"JULIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "zwitting@hotmail.com"
},
{
"system": "phone",
"value": "34 (724) 360-6453"
}
],
"gender": "male",
"birthDate": "2016-01-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:48.545 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:49.692 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:53.209+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:53.209+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:49.692 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTIAGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100469"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEJANDRO DIAZ SANTIAGO",
"family": "DIAZ",
"given": [
"ALEJANDRO"
]
}
],
"telecom": [
{
"system": "email",
"value": "ykirlin@gerhold.com"
}
],
"gender": "male",
"birthDate": "2016-01-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:51.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"749"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:51.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zD1gGuIUCiUzH5pL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14029/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14029/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:51.306 [print] {
"resourceType": "Patient",
"id": "14029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:55.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEJANDRO <b>DIAZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100469</td></tr><tr><td>Date of birth</td><td><span>25 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTIAGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100469"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEJANDRO DIAZ SANTIAGO",
"family": "DIAZ",
"given": [
"ALEJANDRO"
]
}
],
"telecom": [
{
"system": "email",
"value": "ykirlin@gerhold.com"
}
],
"gender": "male",
"birthDate": "2016-01-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:51.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:51.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"749"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:51.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zD1gGuIUCiUzH5pL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14029/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14029/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:51.306 [print] {
"resourceType": "Patient",
"id": "14029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:55.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEJANDRO <b>DIAZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100469</td></tr><tr><td>Date of birth</td><td><span>25 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTIAGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100469"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEJANDRO DIAZ SANTIAGO",
"family": "DIAZ",
"given": [
"ALEJANDRO"
]
}
],
"telecom": [
{
"system": "email",
"value": "ykirlin@gerhold.com"
}
],
"gender": "male",
"birthDate": "2016-01-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:51.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:51.908 [print] {
"resourceType": "Patient",
"id": "14029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:55.959+02:00",
"source": "#zD1gGuIUCiUzH5pL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALEJANDRO <b>DIAZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100469</td></tr><tr><td>Date of birth</td><td><span>25 January 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTIAGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100469"
}
],
"name": [
{
"use": "anonymous",
"text": "ALEJANDRO DIAZ SANTIAGO",
"family": "DIAZ",
"given": [
"ALEJANDRO"
]
}
],
"telecom": [
{
"system": "email",
"value": "ykirlin@gerhold.com"
}
],
"gender": "male",
"birthDate": "2016-01-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:52.703 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:53.521 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:38:57.373+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:38:57.373+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:53.521 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RIVERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "194503"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA LUISA RAMOS RIVERA",
"family": "RAMOS",
"given": [
"MARIA LUISA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jimmy.bartell@gmail.com"
},
{
"system": "phone",
"value": "34 (596) 405-8713"
}
],
"gender": "female",
"birthDate": "2016-03-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:54.175 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:54.175 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ja9WgMozfu34bzat"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14030/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14030/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:54.175 [print] {
"resourceType": "Patient",
"id": "14030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:58.826+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA LUISA <b>RAMOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>194503</td></tr><tr><td>Date of birth</td><td><span>28 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RIVERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "194503"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA LUISA RAMOS RIVERA",
"family": "RAMOS",
"given": [
"MARIA LUISA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jimmy.bartell@gmail.com"
},
{
"system": "phone",
"value": "34 (596) 405-8713"
}
],
"gender": "female",
"birthDate": "2016-03-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:54.175 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:54.175 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:54.175 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ja9WgMozfu34bzat"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14030/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:38:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14030/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:38:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:54.175 [print] {
"resourceType": "Patient",
"id": "14030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:58.826+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA LUISA <b>RAMOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>194503</td></tr><tr><td>Date of birth</td><td><span>28 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RIVERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "194503"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA LUISA RAMOS RIVERA",
"family": "RAMOS",
"given": [
"MARIA LUISA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jimmy.bartell@gmail.com"
},
{
"system": "phone",
"value": "34 (596) 405-8713"
}
],
"gender": "female",
"birthDate": "2016-03-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:54.175 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:54.808 [print] {
"resourceType": "Patient",
"id": "14030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:38:58.826+02:00",
"source": "#Ja9WgMozfu34bzat",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA LUISA <b>RAMOS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>194503</td></tr><tr><td>Date of birth</td><td><span>28 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RIVERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "194503"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA LUISA RAMOS RIVERA",
"family": "RAMOS",
"given": [
"MARIA LUISA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jimmy.bartell@gmail.com"
},
{
"system": "phone",
"value": "34 (596) 405-8713"
}
],
"gender": "female",
"birthDate": "2016-03-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:55.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:56.357 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:00.114+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:00.114+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:56.372 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUBIO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "190450"
}
],
"name": [
{
"use": "anonymous",
"text": "ANTONIA GUTIERREZ RUBIO",
"family": "GUTIERREZ",
"given": [
"ANTONIA"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (488) 403-4401"
}
],
"gender": "female",
"birthDate": "2016-04-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:57.037 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"749"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:57.037 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CEEX818UzJtfqxYB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14031/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14031/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:57.037 [print] {
"resourceType": "Patient",
"id": "14031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:01.688+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANTONIA <b>GUTIERREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>190450</td></tr><tr><td>Date of birth</td><td><span>26 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUBIO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "190450"
}
],
"name": [
{
"use": "anonymous",
"text": "ANTONIA GUTIERREZ RUBIO",
"family": "GUTIERREZ",
"given": [
"ANTONIA"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (488) 403-4401"
}
],
"gender": "female",
"birthDate": "2016-04-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:57.037 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:57.043 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"749"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:57.043 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CEEX818UzJtfqxYB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14031/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14031/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:57.043 [print] {
"resourceType": "Patient",
"id": "14031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:01.688+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANTONIA <b>GUTIERREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>190450</td></tr><tr><td>Date of birth</td><td><span>26 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUBIO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "190450"
}
],
"name": [
{
"use": "anonymous",
"text": "ANTONIA GUTIERREZ RUBIO",
"family": "GUTIERREZ",
"given": [
"ANTONIA"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (488) 403-4401"
}
],
"gender": "female",
"birthDate": "2016-04-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:57.043 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:38:57.684 [print] {
"resourceType": "Patient",
"id": "14031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:01.688+02:00",
"source": "#CEEX818UzJtfqxYB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANTONIA <b>GUTIERREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>190450</td></tr><tr><td>Date of birth</td><td><span>26 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUBIO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "190450"
}
],
"name": [
{
"use": "anonymous",
"text": "ANTONIA GUTIERREZ RUBIO",
"family": "GUTIERREZ",
"given": [
"ANTONIA"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (488) 403-4401"
}
],
"gender": "female",
"birthDate": "2016-04-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:38:58.328 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:38:58.935 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:02.988+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:02.988+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:38:58.939 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRUZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "83039"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTINA BENITEZ CRUZ",
"family": "BENITEZ",
"given": [
"MARTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "gutkowski.tanya@brown.biz"
},
{
"system": "phone",
"value": "34 (301) 931-2458"
}
],
"gender": "female",
"birthDate": "2016-04-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:59.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:59.597 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wO6FLyVG1ASxA2tA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14032/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14032/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:59.599 [print] {
"resourceType": "Patient",
"id": "14032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:04.226+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTINA <b>BENITEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>83039</td></tr><tr><td>Date of birth</td><td><span>29 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRUZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "83039"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTINA BENITEZ CRUZ",
"family": "BENITEZ",
"given": [
"MARTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "gutkowski.tanya@brown.biz"
},
{
"system": "phone",
"value": "34 (301) 931-2458"
}
],
"gender": "female",
"birthDate": "2016-04-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:59.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:38:59.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:38:59.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wO6FLyVG1ASxA2tA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14032/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14032/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:38:59.608 [print] {
"resourceType": "Patient",
"id": "14032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:04.226+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTINA <b>BENITEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>83039</td></tr><tr><td>Date of birth</td><td><span>29 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRUZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "83039"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTINA BENITEZ CRUZ",
"family": "BENITEZ",
"given": [
"MARTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "gutkowski.tanya@brown.biz"
},
{
"system": "phone",
"value": "34 (301) 931-2458"
}
],
"gender": "female",
"birthDate": "2016-04-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:38:59.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:00.269 [print] {
"resourceType": "Patient",
"id": "14032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:04.226+02:00",
"source": "#wO6FLyVG1ASxA2tA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTINA <b>BENITEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>83039</td></tr><tr><td>Date of birth</td><td><span>29 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRUZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "83039"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTINA BENITEZ CRUZ",
"family": "BENITEZ",
"given": [
"MARTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "gutkowski.tanya@brown.biz"
},
{
"system": "phone",
"value": "34 (301) 931-2458"
}
],
"gender": "female",
"birthDate": "2016-04-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:00.926 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:01.530 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:05.589+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:05.589+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:01.546 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CORTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "192119"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CONCEPCION ARIAS CORTES",
"family": "ARIAS",
"given": [
"MARIA CONCEPCION"
]
}
],
"telecom": [
{
"system": "email",
"value": "kaela.turner@gmail.com"
},
{
"system": "phone",
"value": "34 (722) 420-1866"
}
],
"gender": "female",
"birthDate": "2016-09-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:02.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:02.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KpzRvLncaLaBvwwW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14033/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14033/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:02.162 [print] {
"resourceType": "Patient",
"id": "14033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:06.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CONCEPCION <b>ARIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>192119</td></tr><tr><td>Date of birth</td><td><span>28 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CORTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "192119"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CONCEPCION ARIAS CORTES",
"family": "ARIAS",
"given": [
"MARIA CONCEPCION"
]
}
],
"telecom": [
{
"system": "email",
"value": "kaela.turner@gmail.com"
},
{
"system": "phone",
"value": "34 (722) 420-1866"
}
],
"gender": "female",
"birthDate": "2016-09-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:02.162 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:02.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:02.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KpzRvLncaLaBvwwW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14033/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14033/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:02.162 [print] {
"resourceType": "Patient",
"id": "14033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:06.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CONCEPCION <b>ARIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>192119</td></tr><tr><td>Date of birth</td><td><span>28 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CORTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "192119"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CONCEPCION ARIAS CORTES",
"family": "ARIAS",
"given": [
"MARIA CONCEPCION"
]
}
],
"telecom": [
{
"system": "email",
"value": "kaela.turner@gmail.com"
},
{
"system": "phone",
"value": "34 (722) 420-1866"
}
],
"gender": "female",
"birthDate": "2016-09-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:02.162 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:04.042 [print] {
"resourceType": "Patient",
"id": "14033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:06.806+02:00",
"source": "#KpzRvLncaLaBvwwW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CONCEPCION <b>ARIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>192119</td></tr><tr><td>Date of birth</td><td><span>28 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CORTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "192119"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CONCEPCION ARIAS CORTES",
"family": "ARIAS",
"given": [
"MARIA CONCEPCION"
]
}
],
"telecom": [
{
"system": "email",
"value": "kaela.turner@gmail.com"
},
{
"system": "phone",
"value": "34 (722) 420-1866"
}
],
"gender": "female",
"birthDate": "2016-09-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:05.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:06.012 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:09.814+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:09.814+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:06.012 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "63913"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTIN VEGA GUERRERO",
"family": "VEGA",
"given": [
"MARTIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "alfonso.abshire@hotmail.com"
},
{
"system": "phone",
"value": "34 (604) 396-1170"
}
],
"gender": "male",
"birthDate": "2017-04-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:06.659 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:06.659 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HXlBBeHj1bqff7AP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14034/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14034/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:06.659 [print] {
"resourceType": "Patient",
"id": "14034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:11.312+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTIN <b>VEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>63913</td></tr><tr><td>Date of birth</td><td><span>13 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "63913"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTIN VEGA GUERRERO",
"family": "VEGA",
"given": [
"MARTIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "alfonso.abshire@hotmail.com"
},
{
"system": "phone",
"value": "34 (604) 396-1170"
}
],
"gender": "male",
"birthDate": "2017-04-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:06.659 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:06.659 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:06.659 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HXlBBeHj1bqff7AP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14034/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14034/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:06.659 [print] {
"resourceType": "Patient",
"id": "14034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:11.312+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTIN <b>VEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>63913</td></tr><tr><td>Date of birth</td><td><span>13 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "63913"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTIN VEGA GUERRERO",
"family": "VEGA",
"given": [
"MARTIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "alfonso.abshire@hotmail.com"
},
{
"system": "phone",
"value": "34 (604) 396-1170"
}
],
"gender": "male",
"birthDate": "2017-04-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:06.659 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:07.375 [print] {
"resourceType": "Patient",
"id": "14034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:11.312+02:00",
"source": "#HXlBBeHj1bqff7AP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTIN <b>VEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>63913</td></tr><tr><td>Date of birth</td><td><span>13 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "63913"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTIN VEGA GUERRERO",
"family": "VEGA",
"given": [
"MARTIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "alfonso.abshire@hotmail.com"
},
{
"system": "phone",
"value": "34 (604) 396-1170"
}
],
"gender": "male",
"birthDate": "2017-04-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:08.061 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:08.707 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:12.706+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:12.706+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:08.707 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "18667"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCA ROMERO RUIZ",
"family": "ROMERO",
"given": [
"FRANCISCA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kozey.colten@yost.com"
}
],
"gender": "female",
"birthDate": "2017-08-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:09.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"748"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:09.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3oCGkowN92sqDeHj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14035/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14035/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:09.306 [print] {
"resourceType": "Patient",
"id": "14035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:13.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCA <b>ROMERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>18667</td></tr><tr><td>Date of birth</td><td><span>23 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "18667"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCA ROMERO RUIZ",
"family": "ROMERO",
"given": [
"FRANCISCA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kozey.colten@yost.com"
}
],
"gender": "female",
"birthDate": "2017-08-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:09.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:09.312 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"748"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:09.312 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3oCGkowN92sqDeHj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14035/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14035/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:09.312 [print] {
"resourceType": "Patient",
"id": "14035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:13.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCA <b>ROMERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>18667</td></tr><tr><td>Date of birth</td><td><span>23 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "18667"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCA ROMERO RUIZ",
"family": "ROMERO",
"given": [
"FRANCISCA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kozey.colten@yost.com"
}
],
"gender": "female",
"birthDate": "2017-08-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:09.312 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:09.875 [print] {
"resourceType": "Patient",
"id": "14035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:13.959+02:00",
"source": "#3oCGkowN92sqDeHj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCA <b>ROMERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>18667</td></tr><tr><td>Date of birth</td><td><span>23 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "18667"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCA ROMERO RUIZ",
"family": "ROMERO",
"given": [
"FRANCISCA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kozey.colten@yost.com"
}
],
"gender": "female",
"birthDate": "2017-08-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:10.530 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:11.147 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:15.204+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:15.204+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:11.162 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MEDINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "145922"
}
],
"name": [
{
"use": "anonymous",
"text": "ALICIA GUERRERO MEDINA",
"family": "GUERRERO",
"given": [
"ALICIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "abradtke@denesik.biz"
},
{
"system": "phone",
"value": "34 (982) 444-7661"
}
],
"gender": "female",
"birthDate": "2017-10-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:20.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:20.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jmamyLMo4deyW0zv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14036/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14036/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:20.463 [print] {
"resourceType": "Patient",
"id": "14036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:25.120+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALICIA <b>GUERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>145922</td></tr><tr><td>Date of birth</td><td><span>11 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MEDINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "145922"
}
],
"name": [
{
"use": "anonymous",
"text": "ALICIA GUERRERO MEDINA",
"family": "GUERRERO",
"given": [
"ALICIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "abradtke@denesik.biz"
},
{
"system": "phone",
"value": "34 (982) 444-7661"
}
],
"gender": "female",
"birthDate": "2017-10-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:20.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:20.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:20.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jmamyLMo4deyW0zv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14036/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14036/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:20.463 [print] {
"resourceType": "Patient",
"id": "14036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:25.120+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALICIA <b>GUERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>145922</td></tr><tr><td>Date of birth</td><td><span>11 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MEDINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "145922"
}
],
"name": [
{
"use": "anonymous",
"text": "ALICIA GUERRERO MEDINA",
"family": "GUERRERO",
"given": [
"ALICIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "abradtke@denesik.biz"
},
{
"system": "phone",
"value": "34 (982) 444-7661"
}
],
"gender": "female",
"birthDate": "2017-10-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:20.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:21.086 [print] {
"resourceType": "Patient",
"id": "14036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:25.120+02:00",
"source": "#jmamyLMo4deyW0zv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALICIA <b>GUERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>145922</td></tr><tr><td>Date of birth</td><td><span>11 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MEDINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "145922"
}
],
"name": [
{
"use": "anonymous",
"text": "ALICIA GUERRERO MEDINA",
"family": "GUERRERO",
"given": [
"ALICIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "abradtke@denesik.biz"
},
{
"system": "phone",
"value": "34 (982) 444-7661"
}
],
"gender": "female",
"birthDate": "2017-10-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:21.903 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:22.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:26.581+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:26.581+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:22.556 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERRER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "91859"
}
],
"name": [
{
"use": "anonymous",
"text": "LUCAS GIMENEZ FERRER",
"family": "GIMENEZ",
"given": [
"LUCAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "kbergnaum@kessler.biz"
},
{
"system": "phone",
"value": "34 (853) 968-6407"
}
],
"gender": "male",
"birthDate": "2017-10-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:23.285 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:23.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oBTVWiiCNWVyLeLV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14037/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14037/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:23.285 [print] {
"resourceType": "Patient",
"id": "14037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:27.916+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUCAS <b>GIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>91859</td></tr><tr><td>Date of birth</td><td><span>12 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERRER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "91859"
}
],
"name": [
{
"use": "anonymous",
"text": "LUCAS GIMENEZ FERRER",
"family": "GIMENEZ",
"given": [
"LUCAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "kbergnaum@kessler.biz"
},
{
"system": "phone",
"value": "34 (853) 968-6407"
}
],
"gender": "male",
"birthDate": "2017-10-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:23.285 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:23.285 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:23.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oBTVWiiCNWVyLeLV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14037/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14037/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:23.285 [print] {
"resourceType": "Patient",
"id": "14037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:27.916+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUCAS <b>GIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>91859</td></tr><tr><td>Date of birth</td><td><span>12 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERRER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "91859"
}
],
"name": [
{
"use": "anonymous",
"text": "LUCAS GIMENEZ FERRER",
"family": "GIMENEZ",
"given": [
"LUCAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "kbergnaum@kessler.biz"
},
{
"system": "phone",
"value": "34 (853) 968-6407"
}
],
"gender": "male",
"birthDate": "2017-10-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:23.285 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:23.887 [print] {
"resourceType": "Patient",
"id": "14037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:27.916+02:00",
"source": "#oBTVWiiCNWVyLeLV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LUCAS <b>GIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>91859</td></tr><tr><td>Date of birth</td><td><span>12 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERRER"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "91859"
}
],
"name": [
{
"use": "anonymous",
"text": "LUCAS GIMENEZ FERRER",
"family": "GIMENEZ",
"given": [
"LUCAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "kbergnaum@kessler.biz"
},
{
"system": "phone",
"value": "34 (853) 968-6407"
}
],
"gender": "male",
"birthDate": "2017-10-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:24.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:25.109 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:29.165+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:29.165+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:25.109 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "AGUILAR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "213074"
}
],
"name": [
{
"use": "anonymous",
"text": "ADRIANA RIVERA AGUILAR",
"family": "RIVERA",
"given": [
"ADRIANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "conroy.marquise@gmail.com"
},
{
"system": "phone",
"value": "34 (395) 923-1982"
}
],
"gender": "female",
"birthDate": "2017-10-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:25.726 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:25.726 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v7FzyEG1q6HiWifh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14038/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14038/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:25.726 [print] {
"resourceType": "Patient",
"id": "14038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:30.385+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ADRIANA <b>RIVERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>213074</td></tr><tr><td>Date of birth</td><td><span>31 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "AGUILAR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "213074"
}
],
"name": [
{
"use": "anonymous",
"text": "ADRIANA RIVERA AGUILAR",
"family": "RIVERA",
"given": [
"ADRIANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "conroy.marquise@gmail.com"
},
{
"system": "phone",
"value": "34 (395) 923-1982"
}
],
"gender": "female",
"birthDate": "2017-10-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:25.726 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:25.726 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:25.726 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v7FzyEG1q6HiWifh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14038/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14038/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:25.726 [print] {
"resourceType": "Patient",
"id": "14038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:30.385+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ADRIANA <b>RIVERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>213074</td></tr><tr><td>Date of birth</td><td><span>31 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "AGUILAR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "213074"
}
],
"name": [
{
"use": "anonymous",
"text": "ADRIANA RIVERA AGUILAR",
"family": "RIVERA",
"given": [
"ADRIANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "conroy.marquise@gmail.com"
},
{
"system": "phone",
"value": "34 (395) 923-1982"
}
],
"gender": "female",
"birthDate": "2017-10-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:25.726 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:26.327 [print] {
"resourceType": "Patient",
"id": "14038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:30.385+02:00",
"source": "#v7FzyEG1q6HiWifh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ADRIANA <b>RIVERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>213074</td></tr><tr><td>Date of birth</td><td><span>31 October 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "AGUILAR"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "213074"
}
],
"name": [
{
"use": "anonymous",
"text": "ADRIANA RIVERA AGUILAR",
"family": "RIVERA",
"given": [
"ADRIANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "conroy.marquise@gmail.com"
},
{
"system": "phone",
"value": "34 (395) 923-1982"
}
],
"gender": "female",
"birthDate": "2017-10-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:26.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:27.503 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:31.598+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:31.598+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:27.503 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SAEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "180585"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JOSE ALVAREZ SAEZ",
"family": "ALVAREZ",
"given": [
"MARIA JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "loyce18@weimann.info"
},
{
"system": "phone",
"value": "34 (420) 305-6023"
}
],
"gender": "female",
"birthDate": "2012-11-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:28.390 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:28.390 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B0qbIrysQuBahbrP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14039/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14039/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:28.390 [print] {
"resourceType": "Patient",
"id": "14039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:33.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JOSE <b>ALVAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>180585</td></tr><tr><td>Date of birth</td><td><span>27 November 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SAEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "180585"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JOSE ALVAREZ SAEZ",
"family": "ALVAREZ",
"given": [
"MARIA JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "loyce18@weimann.info"
},
{
"system": "phone",
"value": "34 (420) 305-6023"
}
],
"gender": "female",
"birthDate": "2012-11-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:28.390 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:28.406 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:28.406 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B0qbIrysQuBahbrP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14039/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14039/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:28.406 [print] {
"resourceType": "Patient",
"id": "14039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:33.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JOSE <b>ALVAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>180585</td></tr><tr><td>Date of birth</td><td><span>27 November 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SAEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "180585"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JOSE ALVAREZ SAEZ",
"family": "ALVAREZ",
"given": [
"MARIA JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "loyce18@weimann.info"
},
{
"system": "phone",
"value": "34 (420) 305-6023"
}
],
"gender": "female",
"birthDate": "2012-11-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:28.406 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:28.997 [print] {
"resourceType": "Patient",
"id": "14039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:33.035+02:00",
"source": "#B0qbIrysQuBahbrP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JOSE <b>ALVAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>180585</td></tr><tr><td>Date of birth</td><td><span>27 November 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SAEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "180585"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JOSE ALVAREZ SAEZ",
"family": "ALVAREZ",
"given": [
"MARIA JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "loyce18@weimann.info"
},
{
"system": "phone",
"value": "34 (420) 305-6023"
}
],
"gender": "female",
"birthDate": "2012-11-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:29.830 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:30.494 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:34.508+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:34.508+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:30.494 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FUENTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "144259"
}
],
"name": [
{
"use": "anonymous",
"text": "ISMAEL HERRERO FUENTES",
"family": "HERRERO",
"given": [
"ISMAEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "eichmann.savanah@hotmail.com"
},
{
"system": "phone",
"value": "34 (724) 858-1242"
}
],
"gender": "male",
"birthDate": "2013-01-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:40.215 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:40.215 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"x0KOanxQUyv9jPAZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14040/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14040/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:40.215 [print] {
"resourceType": "Patient",
"id": "14040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:44.862+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ISMAEL <b>HERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>144259</td></tr><tr><td>Date of birth</td><td><span>24 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FUENTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "144259"
}
],
"name": [
{
"use": "anonymous",
"text": "ISMAEL HERRERO FUENTES",
"family": "HERRERO",
"given": [
"ISMAEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "eichmann.savanah@hotmail.com"
},
{
"system": "phone",
"value": "34 (724) 858-1242"
}
],
"gender": "male",
"birthDate": "2013-01-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:40.215 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:40.215 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:40.215 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"x0KOanxQUyv9jPAZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14040/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14040/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:40.215 [print] {
"resourceType": "Patient",
"id": "14040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:44.862+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ISMAEL <b>HERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>144259</td></tr><tr><td>Date of birth</td><td><span>24 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FUENTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "144259"
}
],
"name": [
{
"use": "anonymous",
"text": "ISMAEL HERRERO FUENTES",
"family": "HERRERO",
"given": [
"ISMAEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "eichmann.savanah@hotmail.com"
},
{
"system": "phone",
"value": "34 (724) 858-1242"
}
],
"gender": "male",
"birthDate": "2013-01-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:40.215 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:41.586 [print] {
"resourceType": "Patient",
"id": "14040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:44.862+02:00",
"source": "#x0KOanxQUyv9jPAZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ISMAEL <b>HERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>144259</td></tr><tr><td>Date of birth</td><td><span>24 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FUENTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "144259"
}
],
"name": [
{
"use": "anonymous",
"text": "ISMAEL HERRERO FUENTES",
"family": "HERRERO",
"given": [
"ISMAEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "eichmann.savanah@hotmail.com"
},
{
"system": "phone",
"value": "34 (724) 858-1242"
}
],
"gender": "male",
"birthDate": "2013-01-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:42.428 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:43.266 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:47.093+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:47.093+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:43.281 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROJAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "68458"
}
],
"name": [
{
"use": "anonymous",
"text": "SERGIO TORRES ROJAS",
"family": "TORRES",
"given": [
"SERGIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "jheathcote@dibbert.com"
},
{
"system": "phone",
"value": "34 (304) 501-8522"
}
],
"gender": "male",
"birthDate": "2013-02-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:43.921 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:43.921 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4uKXFNzwaBxMiGJ6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14041/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14041/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:43.921 [print] {
"resourceType": "Patient",
"id": "14041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:48.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SERGIO <b>TORRES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>68458</td></tr><tr><td>Date of birth</td><td><span>13 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROJAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "68458"
}
],
"name": [
{
"use": "anonymous",
"text": "SERGIO TORRES ROJAS",
"family": "TORRES",
"given": [
"SERGIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "jheathcote@dibbert.com"
},
{
"system": "phone",
"value": "34 (304) 501-8522"
}
],
"gender": "male",
"birthDate": "2013-02-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:43.921 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:43.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:43.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4uKXFNzwaBxMiGJ6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14041/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14041/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:43.936 [print] {
"resourceType": "Patient",
"id": "14041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:48.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SERGIO <b>TORRES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>68458</td></tr><tr><td>Date of birth</td><td><span>13 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROJAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "68458"
}
],
"name": [
{
"use": "anonymous",
"text": "SERGIO TORRES ROJAS",
"family": "TORRES",
"given": [
"SERGIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "jheathcote@dibbert.com"
},
{
"system": "phone",
"value": "34 (304) 501-8522"
}
],
"gender": "male",
"birthDate": "2013-02-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:43.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:44.569 [print] {
"resourceType": "Patient",
"id": "14041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:48.573+02:00",
"source": "#4uKXFNzwaBxMiGJ6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SERGIO <b>TORRES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>68458</td></tr><tr><td>Date of birth</td><td><span>13 February 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROJAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "68458"
}
],
"name": [
{
"use": "anonymous",
"text": "SERGIO TORRES ROJAS",
"family": "TORRES",
"given": [
"SERGIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "jheathcote@dibbert.com"
},
{
"system": "phone",
"value": "34 (304) 501-8522"
}
],
"gender": "male",
"birthDate": "2013-02-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:45.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:46.214 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:50.091+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:50.091+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:46.214 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORALES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "2329"
}
],
"name": [
{
"use": "anonymous",
"text": "VICENTE IGLESIAS MORALES",
"family": "IGLESIAS",
"given": [
"VICENTE"
]
}
],
"telecom": [
{
"system": "email",
"value": "lois44@mertz.com"
},
{
"system": "phone",
"value": "34 (418) 474-3316"
}
],
"gender": "male",
"birthDate": "2013-03-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:47.047 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:47.047 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IkmTRzfwXCKi16K5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14042/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14042/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:47.047 [print] {
"resourceType": "Patient",
"id": "14042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:51.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICENTE <b>IGLESIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>2329</td></tr><tr><td>Date of birth</td><td><span>20 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORALES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "2329"
}
],
"name": [
{
"use": "anonymous",
"text": "VICENTE IGLESIAS MORALES",
"family": "IGLESIAS",
"given": [
"VICENTE"
]
}
],
"telecom": [
{
"system": "email",
"value": "lois44@mertz.com"
},
{
"system": "phone",
"value": "34 (418) 474-3316"
}
],
"gender": "male",
"birthDate": "2013-03-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:47.047 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:47.047 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:47.047 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IkmTRzfwXCKi16K5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14042/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14042/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:47.047 [print] {
"resourceType": "Patient",
"id": "14042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:51.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICENTE <b>IGLESIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>2329</td></tr><tr><td>Date of birth</td><td><span>20 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORALES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "2329"
}
],
"name": [
{
"use": "anonymous",
"text": "VICENTE IGLESIAS MORALES",
"family": "IGLESIAS",
"given": [
"VICENTE"
]
}
],
"telecom": [
{
"system": "email",
"value": "lois44@mertz.com"
},
{
"system": "phone",
"value": "34 (418) 474-3316"
}
],
"gender": "male",
"birthDate": "2013-03-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:47.047 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:47.850 [print] {
"resourceType": "Patient",
"id": "14042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:51.690+02:00",
"source": "#IkmTRzfwXCKi16K5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICENTE <b>IGLESIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>2329</td></tr><tr><td>Date of birth</td><td><span>20 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORALES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "2329"
}
],
"name": [
{
"use": "anonymous",
"text": "VICENTE IGLESIAS MORALES",
"family": "IGLESIAS",
"given": [
"VICENTE"
]
}
],
"telecom": [
{
"system": "email",
"value": "lois44@mertz.com"
},
{
"system": "phone",
"value": "34 (418) 474-3316"
}
],
"gender": "male",
"birthDate": "2013-03-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:52.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:54.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:39:57.124+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:39:57.124+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:54.085 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABALLERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12983"
}
],
"name": [
{
"use": "anonymous",
"text": "AINHOA VELASCO CABALLERO",
"family": "VELASCO",
"given": [
"AINHOA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jordyn.rau@hermann.com"
},
{
"system": "phone",
"value": "34 (666) 569-2359"
}
],
"gender": "female",
"birthDate": "2013-06-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:54.771 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:54.771 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8dOnZ5RDcZZLF2ps"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14043/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14043/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:54.771 [print] {
"resourceType": "Patient",
"id": "14043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:59.408+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AINHOA <b>VELASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12983</td></tr><tr><td>Date of birth</td><td><span>13 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABALLERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12983"
}
],
"name": [
{
"use": "anonymous",
"text": "AINHOA VELASCO CABALLERO",
"family": "VELASCO",
"given": [
"AINHOA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jordyn.rau@hermann.com"
},
{
"system": "phone",
"value": "34 (666) 569-2359"
}
],
"gender": "female",
"birthDate": "2013-06-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:54.771 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:54.771 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:54.771 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8dOnZ5RDcZZLF2ps"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14043/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:39:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14043/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:39:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:54.771 [print] {
"resourceType": "Patient",
"id": "14043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:59.408+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AINHOA <b>VELASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12983</td></tr><tr><td>Date of birth</td><td><span>13 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABALLERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12983"
}
],
"name": [
{
"use": "anonymous",
"text": "AINHOA VELASCO CABALLERO",
"family": "VELASCO",
"given": [
"AINHOA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jordyn.rau@hermann.com"
},
{
"system": "phone",
"value": "34 (666) 569-2359"
}
],
"gender": "female",
"birthDate": "2013-06-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:54.771 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:56.395 [print] {
"resourceType": "Patient",
"id": "14043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:39:59.408+02:00",
"source": "#8dOnZ5RDcZZLF2ps",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AINHOA <b>VELASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>12983</td></tr><tr><td>Date of birth</td><td><span>13 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABALLERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "12983"
}
],
"name": [
{
"use": "anonymous",
"text": "AINHOA VELASCO CABALLERO",
"family": "VELASCO",
"given": [
"AINHOA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jordyn.rau@hermann.com"
},
{
"system": "phone",
"value": "34 (666) 569-2359"
}
],
"gender": "female",
"birthDate": "2013-06-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:57.027 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:39:57.666 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:01.693+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:01.693+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:39:57.666 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "111674"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSA MARIA RAMIREZ RAMOS",
"family": "RAMIREZ",
"given": [
"ROSA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "oberbrunner.reanna@aufderhar.biz"
}
],
"gender": "female",
"birthDate": "2013-07-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:58.368 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"766"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:58.368 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EbwUxWPmyCYXHFCT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14044/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14044/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:58.368 [print] {
"resourceType": "Patient",
"id": "14044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:02.992+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSA MARIA <b>RAMIREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>111674</td></tr><tr><td>Date of birth</td><td><span>01 July 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "111674"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSA MARIA RAMIREZ RAMOS",
"family": "RAMIREZ",
"given": [
"ROSA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "oberbrunner.reanna@aufderhar.biz"
}
],
"gender": "female",
"birthDate": "2013-07-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:58.368 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:39:58.368 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"766"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:39:58.368 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EbwUxWPmyCYXHFCT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14044/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14044/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:39:58.368 [print] {
"resourceType": "Patient",
"id": "14044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:02.992+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSA MARIA <b>RAMIREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>111674</td></tr><tr><td>Date of birth</td><td><span>01 July 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "111674"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSA MARIA RAMIREZ RAMOS",
"family": "RAMIREZ",
"given": [
"ROSA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "oberbrunner.reanna@aufderhar.biz"
}
],
"gender": "female",
"birthDate": "2013-07-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:39:58.368 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:39:59.020 [print] {
"resourceType": "Patient",
"id": "14044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:02.992+02:00",
"source": "#EbwUxWPmyCYXHFCT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSA MARIA <b>RAMIREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>111674</td></tr><tr><td>Date of birth</td><td><span>01 July 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RAMOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "111674"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSA MARIA RAMIREZ RAMOS",
"family": "RAMIREZ",
"given": [
"ROSA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "oberbrunner.reanna@aufderhar.biz"
}
],
"gender": "female",
"birthDate": "2013-07-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:39:59.659 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:00.728 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:04.339+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:04.339+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:00.728 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "48251"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO FERNANDEZ VEGA",
"family": "FERNANDEZ",
"given": [
"FRANCISCO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (709) 921-2644"
}
],
"gender": "male",
"birthDate": "2013-08-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:01.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"748"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:01.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0Ndx0qpSPX0r1rok"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14045/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14045/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:01.629 [print] {
"resourceType": "Patient",
"id": "14045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:06.282+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO <b>FERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>48251</td></tr><tr><td>Date of birth</td><td><span>01 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "48251"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO FERNANDEZ VEGA",
"family": "FERNANDEZ",
"given": [
"FRANCISCO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (709) 921-2644"
}
],
"gender": "male",
"birthDate": "2013-08-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:01.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:01.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"748"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:01.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0Ndx0qpSPX0r1rok"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14045/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14045/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:01.629 [print] {
"resourceType": "Patient",
"id": "14045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:06.282+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO <b>FERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>48251</td></tr><tr><td>Date of birth</td><td><span>01 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "48251"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO FERNANDEZ VEGA",
"family": "FERNANDEZ",
"given": [
"FRANCISCO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (709) 921-2644"
}
],
"gender": "male",
"birthDate": "2013-08-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:01.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:02.290 [print] {
"resourceType": "Patient",
"id": "14045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:06.282+02:00",
"source": "#0Ndx0qpSPX0r1rok",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO <b>FERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>48251</td></tr><tr><td>Date of birth</td><td><span>01 August 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "48251"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO FERNANDEZ VEGA",
"family": "FERNANDEZ",
"given": [
"FRANCISCO"
]
}
],
"telecom": [
{
"system": "phone",
"value": "34 (709) 921-2644"
}
],
"gender": "male",
"birthDate": "2013-08-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:03.178 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:04.142 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:07.839+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:07.839+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:04.142 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "59912"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO JOSE MENDEZ MARQUEZ",
"family": "MENDEZ",
"given": [
"FRANCISCO JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "elsie.stracke@hotmail.com"
},
{
"system": "phone",
"value": "34 (444) 404-0499"
}
],
"gender": "male",
"birthDate": "2013-09-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:05.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:05.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tJ9lsnUjWqCjUrQB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14046/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14046/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:05.120 [print] {
"resourceType": "Patient",
"id": "14046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:09.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO JOSE <b>MENDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>59912</td></tr><tr><td>Date of birth</td><td><span>20 September 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "59912"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO JOSE MENDEZ MARQUEZ",
"family": "MENDEZ",
"given": [
"FRANCISCO JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "elsie.stracke@hotmail.com"
},
{
"system": "phone",
"value": "34 (444) 404-0499"
}
],
"gender": "male",
"birthDate": "2013-09-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:05.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:05.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:05.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tJ9lsnUjWqCjUrQB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14046/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14046/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:05.120 [print] {
"resourceType": "Patient",
"id": "14046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:09.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO JOSE <b>MENDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>59912</td></tr><tr><td>Date of birth</td><td><span>20 September 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "59912"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO JOSE MENDEZ MARQUEZ",
"family": "MENDEZ",
"given": [
"FRANCISCO JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "elsie.stracke@hotmail.com"
},
{
"system": "phone",
"value": "34 (444) 404-0499"
}
],
"gender": "male",
"birthDate": "2013-09-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:05.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:12.770 [print] {
"resourceType": "Patient",
"id": "14046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:09.757+02:00",
"source": "#tJ9lsnUjWqCjUrQB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FRANCISCO JOSE <b>MENDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>59912</td></tr><tr><td>Date of birth</td><td><span>20 September 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "59912"
}
],
"name": [
{
"use": "anonymous",
"text": "FRANCISCO JOSE MENDEZ MARQUEZ",
"family": "MENDEZ",
"given": [
"FRANCISCO JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "elsie.stracke@hotmail.com"
},
{
"system": "phone",
"value": "34 (444) 404-0499"
}
],
"gender": "male",
"birthDate": "2013-09-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:13.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:14.996 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:18.064+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:18.064+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:14.996 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "208864"
}
],
"name": [
{
"use": "anonymous",
"text": "DOMINGO SOTO CANO",
"family": "SOTO",
"given": [
"DOMINGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "chris.paucek@tromp.com"
},
{
"system": "phone",
"value": "34 (725) 887-5220"
}
],
"gender": "male",
"birthDate": "2013-10-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:15.639 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:15.639 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y7fn3KOYAkMTYpe5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14047/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14047/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:15.639 [print] {
"resourceType": "Patient",
"id": "14047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:20.289+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DOMINGO <b>SOTO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>208864</td></tr><tr><td>Date of birth</td><td><span>28 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "208864"
}
],
"name": [
{
"use": "anonymous",
"text": "DOMINGO SOTO CANO",
"family": "SOTO",
"given": [
"DOMINGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "chris.paucek@tromp.com"
},
{
"system": "phone",
"value": "34 (725) 887-5220"
}
],
"gender": "male",
"birthDate": "2013-10-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:15.639 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:15.639 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:15.639 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y7fn3KOYAkMTYpe5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14047/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14047/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:15.639 [print] {
"resourceType": "Patient",
"id": "14047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:20.289+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DOMINGO <b>SOTO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>208864</td></tr><tr><td>Date of birth</td><td><span>28 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "208864"
}
],
"name": [
{
"use": "anonymous",
"text": "DOMINGO SOTO CANO",
"family": "SOTO",
"given": [
"DOMINGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "chris.paucek@tromp.com"
},
{
"system": "phone",
"value": "34 (725) 887-5220"
}
],
"gender": "male",
"birthDate": "2013-10-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:15.639 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:16.206 [print] {
"resourceType": "Patient",
"id": "14047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:20.289+02:00",
"source": "#Y7fn3KOYAkMTYpe5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DOMINGO <b>SOTO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>208864</td></tr><tr><td>Date of birth</td><td><span>28 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "208864"
}
],
"name": [
{
"use": "anonymous",
"text": "DOMINGO SOTO CANO",
"family": "SOTO",
"given": [
"DOMINGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "chris.paucek@tromp.com"
},
{
"system": "phone",
"value": "34 (725) 887-5220"
}
],
"gender": "male",
"birthDate": "2013-10-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:16.791 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:17.376 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:21.462+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:21.462+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:17.376 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASCUAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "1502"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIA SUAREZ PASCUAL",
"family": "SUAREZ",
"given": [
"JULIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "lcormier@krajcik.com"
},
{
"system": "phone",
"value": "34 (938) 767-1344"
}
],
"gender": "female",
"birthDate": "2013-12-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:18.030 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:18.030 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aoGp0NaPw1vnLF54"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14048/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14048/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:18.030 [print] {
"resourceType": "Patient",
"id": "14048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:22.675+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIA <b>SUAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>1502</td></tr><tr><td>Date of birth</td><td><span>26 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASCUAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "1502"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIA SUAREZ PASCUAL",
"family": "SUAREZ",
"given": [
"JULIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "lcormier@krajcik.com"
},
{
"system": "phone",
"value": "34 (938) 767-1344"
}
],
"gender": "female",
"birthDate": "2013-12-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:18.030 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:18.030 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"791"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:18.030 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aoGp0NaPw1vnLF54"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14048/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14048/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:18.030 [print] {
"resourceType": "Patient",
"id": "14048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:22.675+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIA <b>SUAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>1502</td></tr><tr><td>Date of birth</td><td><span>26 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASCUAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "1502"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIA SUAREZ PASCUAL",
"family": "SUAREZ",
"given": [
"JULIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "lcormier@krajcik.com"
},
{
"system": "phone",
"value": "34 (938) 767-1344"
}
],
"gender": "female",
"birthDate": "2013-12-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:18.030 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:18.630 [print] {
"resourceType": "Patient",
"id": "14048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:22.675+02:00",
"source": "#aoGp0NaPw1vnLF54",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIA <b>SUAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>1502</td></tr><tr><td>Date of birth</td><td><span>26 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PASCUAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "1502"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIA SUAREZ PASCUAL",
"family": "SUAREZ",
"given": [
"JULIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "lcormier@krajcik.com"
},
{
"system": "phone",
"value": "34 (938) 767-1344"
}
],
"gender": "female",
"birthDate": "2013-12-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:19.421 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:20.143 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:24.092+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:24.092+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:20.145 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARRIDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "166775"
}
],
"name": [
{
"use": "anonymous",
"text": "NICOLAS CABALLERO GARRIDO",
"family": "CABALLERO",
"given": [
"NICOLAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "vprohaska@waelchi.org"
},
{
"system": "phone",
"value": "34 (876) 293-0020"
}
],
"gender": "male",
"birthDate": "2014-02-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:20.781 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:20.781 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g5VyjIeXLzA7yswS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14049/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14049/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:20.781 [print] {
"resourceType": "Patient",
"id": "14049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:25.408+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NICOLAS <b>CABALLERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>166775</td></tr><tr><td>Date of birth</td><td><span>05 February 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARRIDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "166775"
}
],
"name": [
{
"use": "anonymous",
"text": "NICOLAS CABALLERO GARRIDO",
"family": "CABALLERO",
"given": [
"NICOLAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "vprohaska@waelchi.org"
},
{
"system": "phone",
"value": "34 (876) 293-0020"
}
],
"gender": "male",
"birthDate": "2014-02-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:20.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:20.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:20.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g5VyjIeXLzA7yswS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14049/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14049/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:20.784 [print] {
"resourceType": "Patient",
"id": "14049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:25.408+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NICOLAS <b>CABALLERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>166775</td></tr><tr><td>Date of birth</td><td><span>05 February 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARRIDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "166775"
}
],
"name": [
{
"use": "anonymous",
"text": "NICOLAS CABALLERO GARRIDO",
"family": "CABALLERO",
"given": [
"NICOLAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "vprohaska@waelchi.org"
},
{
"system": "phone",
"value": "34 (876) 293-0020"
}
],
"gender": "male",
"birthDate": "2014-02-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:20.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:21.414 [print] {
"resourceType": "Patient",
"id": "14049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:25.408+02:00",
"source": "#g5VyjIeXLzA7yswS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NICOLAS <b>CABALLERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>166775</td></tr><tr><td>Date of birth</td><td><span>05 February 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARRIDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "166775"
}
],
"name": [
{
"use": "anonymous",
"text": "NICOLAS CABALLERO GARRIDO",
"family": "CABALLERO",
"given": [
"NICOLAS"
]
}
],
"telecom": [
{
"system": "email",
"value": "vprohaska@waelchi.org"
},
{
"system": "phone",
"value": "34 (876) 293-0020"
}
],
"gender": "male",
"birthDate": "2014-02-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:22.006 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:23.667 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:26.681+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:26.681+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:23.667 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIAZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "159342"
}
],
"name": [
{
"use": "anonymous",
"text": "IKER IBAÑEZ DIAZ",
"family": "IBAÑEZ",
"given": [
"IKER"
]
}
],
"telecom": [
{
"system": "email",
"value": "zelma90@toy.com"
},
{
"system": "phone",
"value": "34 (441) 602-5198"
}
],
"gender": "male",
"birthDate": "2014-06-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:24.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:24.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CEv8NWexmzvS9Ew0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14050/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14050/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:24.305 [print] {
"resourceType": "Patient",
"id": "14050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:28.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IKER <b>IBAÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>159342</td></tr><tr><td>Date of birth</td><td><span>20 June 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIAZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "159342"
}
],
"name": [
{
"use": "anonymous",
"text": "IKER IBAÑEZ DIAZ",
"family": "IBAÑEZ",
"given": [
"IKER"
]
}
],
"telecom": [
{
"system": "email",
"value": "zelma90@toy.com"
},
{
"system": "phone",
"value": "34 (441) 602-5198"
}
],
"gender": "male",
"birthDate": "2014-06-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:24.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:24.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:24.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CEv8NWexmzvS9Ew0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14050/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14050/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:24.305 [print] {
"resourceType": "Patient",
"id": "14050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:28.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IKER <b>IBAÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>159342</td></tr><tr><td>Date of birth</td><td><span>20 June 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIAZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "159342"
}
],
"name": [
{
"use": "anonymous",
"text": "IKER IBAÑEZ DIAZ",
"family": "IBAÑEZ",
"given": [
"IKER"
]
}
],
"telecom": [
{
"system": "email",
"value": "zelma90@toy.com"
},
{
"system": "phone",
"value": "34 (441) 602-5198"
}
],
"gender": "male",
"birthDate": "2014-06-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:24.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:24.940 [print] {
"resourceType": "Patient",
"id": "14050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:28.959+02:00",
"source": "#CEv8NWexmzvS9Ew0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IKER <b>IBAÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>159342</td></tr><tr><td>Date of birth</td><td><span>20 June 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIAZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "159342"
}
],
"name": [
{
"use": "anonymous",
"text": "IKER IBAÑEZ DIAZ",
"family": "IBAÑEZ",
"given": [
"IKER"
]
}
],
"telecom": [
{
"system": "email",
"value": "zelma90@toy.com"
},
{
"system": "phone",
"value": "34 (441) 602-5198"
}
],
"gender": "male",
"birthDate": "2014-06-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:25.673 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:26.276 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:30.342+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:30.342+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:26.276 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "75386"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTA HERNANDEZ SANZ",
"family": "HERNANDEZ",
"given": [
"MARTA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tierra97@yahoo.com"
},
{
"system": "phone",
"value": "34 (805) 910-5189"
}
],
"gender": "female",
"birthDate": "2014-07-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:26.937 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:26.937 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"po3esJ2ASgDJ8J3x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14051/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14051/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:26.937 [print] {
"resourceType": "Patient",
"id": "14051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:31.586+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTA <b>HERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>75386</td></tr><tr><td>Date of birth</td><td><span>23 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "75386"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTA HERNANDEZ SANZ",
"family": "HERNANDEZ",
"given": [
"MARTA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tierra97@yahoo.com"
},
{
"system": "phone",
"value": "34 (805) 910-5189"
}
],
"gender": "female",
"birthDate": "2014-07-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:26.937 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:26.937 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:26.937 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"po3esJ2ASgDJ8J3x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14051/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14051/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:26.937 [print] {
"resourceType": "Patient",
"id": "14051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:31.586+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTA <b>HERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>75386</td></tr><tr><td>Date of birth</td><td><span>23 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "75386"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTA HERNANDEZ SANZ",
"family": "HERNANDEZ",
"given": [
"MARTA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tierra97@yahoo.com"
},
{
"system": "phone",
"value": "34 (805) 910-5189"
}
],
"gender": "female",
"birthDate": "2014-07-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:26.937 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:27.543 [print] {
"resourceType": "Patient",
"id": "14051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:31.586+02:00",
"source": "#po3esJ2ASgDJ8J3x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARTA <b>HERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>75386</td></tr><tr><td>Date of birth</td><td><span>23 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "75386"
}
],
"name": [
{
"use": "anonymous",
"text": "MARTA HERNANDEZ SANZ",
"family": "HERNANDEZ",
"given": [
"MARTA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tierra97@yahoo.com"
},
{
"system": "phone",
"value": "34 (805) 910-5189"
}
],
"gender": "female",
"birthDate": "2014-07-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:28.545 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:30.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:33.207+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:33.207+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:30.106 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SERRANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "127380"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA JIMENEZ SERRANO",
"family": "JIMENEZ",
"given": [
"ANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ebert.kari@hand.com"
},
{
"system": "phone",
"value": "34 (336) 714-5827"
}
],
"gender": "female",
"birthDate": "2014-10-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:30.746 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:30.746 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oCD6gFLHD56c0Dk4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14052/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14052/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:30.746 [print] {
"resourceType": "Patient",
"id": "14052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:35.388+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA <b>JIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>127380</td></tr><tr><td>Date of birth</td><td><span>22 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SERRANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "127380"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA JIMENEZ SERRANO",
"family": "JIMENEZ",
"given": [
"ANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ebert.kari@hand.com"
},
{
"system": "phone",
"value": "34 (336) 714-5827"
}
],
"gender": "female",
"birthDate": "2014-10-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:30.746 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:30.746 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:30.746 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oCD6gFLHD56c0Dk4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14052/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14052/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:30.746 [print] {
"resourceType": "Patient",
"id": "14052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:35.388+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA <b>JIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>127380</td></tr><tr><td>Date of birth</td><td><span>22 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SERRANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "127380"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA JIMENEZ SERRANO",
"family": "JIMENEZ",
"given": [
"ANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ebert.kari@hand.com"
},
{
"system": "phone",
"value": "34 (336) 714-5827"
}
],
"gender": "female",
"birthDate": "2014-10-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:30.746 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:31.371 [print] {
"resourceType": "Patient",
"id": "14052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:35.388+02:00",
"source": "#oCD6gFLHD56c0Dk4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA <b>JIMENEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>127380</td></tr><tr><td>Date of birth</td><td><span>22 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SERRANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "127380"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA JIMENEZ SERRANO",
"family": "JIMENEZ",
"given": [
"ANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ebert.kari@hand.com"
},
{
"system": "phone",
"value": "34 (336) 714-5827"
}
],
"gender": "female",
"birthDate": "2014-10-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:32.190 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:32.809 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:36.859+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:36.859+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:32.809 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "173336"
}
],
"name": [
{
"use": "anonymous",
"text": "SEBASTIAN MORA CASTRO",
"family": "MORA",
"given": [
"SEBASTIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "christop77@beer.com"
},
{
"system": "phone",
"value": "34 (212) 959-6930"
}
],
"gender": "male",
"birthDate": "2014-11-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:33.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:33.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c15a2DdywsXPQJab"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14053/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14053/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:33.418 [print] {
"resourceType": "Patient",
"id": "14053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:38.068+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SEBASTIAN <b>MORA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>173336</td></tr><tr><td>Date of birth</td><td><span>10 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "173336"
}
],
"name": [
{
"use": "anonymous",
"text": "SEBASTIAN MORA CASTRO",
"family": "MORA",
"given": [
"SEBASTIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "christop77@beer.com"
},
{
"system": "phone",
"value": "34 (212) 959-6930"
}
],
"gender": "male",
"birthDate": "2014-11-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:33.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:33.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:33.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c15a2DdywsXPQJab"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14053/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14053/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:33.418 [print] {
"resourceType": "Patient",
"id": "14053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:38.068+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SEBASTIAN <b>MORA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>173336</td></tr><tr><td>Date of birth</td><td><span>10 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "173336"
}
],
"name": [
{
"use": "anonymous",
"text": "SEBASTIAN MORA CASTRO",
"family": "MORA",
"given": [
"SEBASTIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "christop77@beer.com"
},
{
"system": "phone",
"value": "34 (212) 959-6930"
}
],
"gender": "male",
"birthDate": "2014-11-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:33.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:34.030 [print] {
"resourceType": "Patient",
"id": "14053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:38.068+02:00",
"source": "#c15a2DdywsXPQJab",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SEBASTIAN <b>MORA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>173336</td></tr><tr><td>Date of birth</td><td><span>10 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "173336"
}
],
"name": [
{
"use": "anonymous",
"text": "SEBASTIAN MORA CASTRO",
"family": "MORA",
"given": [
"SEBASTIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "christop77@beer.com"
},
{
"system": "phone",
"value": "34 (212) 959-6930"
}
],
"gender": "male",
"birthDate": "2014-11-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:34.636 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:45.192 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:39.303+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:39.303+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:45.208 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ARIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "189867"
}
],
"name": [
{
"use": "anonymous",
"text": "GLORIA BRAVO ARIAS",
"family": "BRAVO",
"given": [
"GLORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tressa29@yahoo.com"
},
{
"system": "phone",
"value": "34 (478) 255-6134"
}
],
"gender": "female",
"birthDate": "2014-12-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:45.829 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:45.829 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lIH4UXRPVKeGgewj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14054/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14054/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:45.829 [print] {
"resourceType": "Patient",
"id": "14054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:50.483+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GLORIA <b>BRAVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>189867</td></tr><tr><td>Date of birth</td><td><span>17 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ARIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "189867"
}
],
"name": [
{
"use": "anonymous",
"text": "GLORIA BRAVO ARIAS",
"family": "BRAVO",
"given": [
"GLORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tressa29@yahoo.com"
},
{
"system": "phone",
"value": "34 (478) 255-6134"
}
],
"gender": "female",
"birthDate": "2014-12-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:45.829 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:45.844 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:45.844 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lIH4UXRPVKeGgewj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14054/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14054/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:45.844 [print] {
"resourceType": "Patient",
"id": "14054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:50.483+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GLORIA <b>BRAVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>189867</td></tr><tr><td>Date of birth</td><td><span>17 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ARIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "189867"
}
],
"name": [
{
"use": "anonymous",
"text": "GLORIA BRAVO ARIAS",
"family": "BRAVO",
"given": [
"GLORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tressa29@yahoo.com"
},
{
"system": "phone",
"value": "34 (478) 255-6134"
}
],
"gender": "female",
"birthDate": "2014-12-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:45.844 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:46.468 [print] {
"resourceType": "Patient",
"id": "14054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:50.483+02:00",
"source": "#lIH4UXRPVKeGgewj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GLORIA <b>BRAVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>189867</td></tr><tr><td>Date of birth</td><td><span>17 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ARIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "189867"
}
],
"name": [
{
"use": "anonymous",
"text": "GLORIA BRAVO ARIAS",
"family": "BRAVO",
"given": [
"GLORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tressa29@yahoo.com"
},
{
"system": "phone",
"value": "34 (478) 255-6134"
}
],
"gender": "female",
"birthDate": "2014-12-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:47.296 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:47.926 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:51.763+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:51.763+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:47.926 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOLINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "186017"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIO GARRIDO MOLINA",
"family": "GARRIDO",
"given": [
"MARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "elliott70@hotmail.com"
},
{
"system": "phone",
"value": "34 (894) 745-4516"
}
],
"gender": "male",
"birthDate": "2015-03-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:48.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:48.596 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9nrIYSwUa3XJQ3ou"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14055/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14055/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:48.596 [print] {
"resourceType": "Patient",
"id": "14055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:53.211+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIO <b>GARRIDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>186017</td></tr><tr><td>Date of birth</td><td><span>10 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOLINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "186017"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIO GARRIDO MOLINA",
"family": "GARRIDO",
"given": [
"MARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "elliott70@hotmail.com"
},
{
"system": "phone",
"value": "34 (894) 745-4516"
}
],
"gender": "male",
"birthDate": "2015-03-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:48.596 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:48.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:48.596 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9nrIYSwUa3XJQ3ou"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14055/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14055/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:48.596 [print] {
"resourceType": "Patient",
"id": "14055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:53.211+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIO <b>GARRIDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>186017</td></tr><tr><td>Date of birth</td><td><span>10 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOLINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "186017"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIO GARRIDO MOLINA",
"family": "GARRIDO",
"given": [
"MARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "elliott70@hotmail.com"
},
{
"system": "phone",
"value": "34 (894) 745-4516"
}
],
"gender": "male",
"birthDate": "2015-03-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:48.596 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:49.229 [print] {
"resourceType": "Patient",
"id": "14055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:53.211+02:00",
"source": "#9nrIYSwUa3XJQ3ou",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIO <b>GARRIDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>186017</td></tr><tr><td>Date of birth</td><td><span>10 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOLINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "186017"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIO GARRIDO MOLINA",
"family": "GARRIDO",
"given": [
"MARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "elliott70@hotmail.com"
},
{
"system": "phone",
"value": "34 (894) 745-4516"
}
],
"gender": "male",
"birthDate": "2015-03-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:49.880 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:51.528 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:54.543+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:54.543+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:51.543 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "178911"
}
],
"name": [
{
"use": "anonymous",
"text": "JAIME CANO MARTIN",
"family": "CANO",
"given": [
"JAIME"
]
}
],
"telecom": [
{
"system": "email",
"value": "buck.okeefe@heller.biz"
},
{
"system": "phone",
"value": "34 (349) 476-2129"
}
],
"gender": "male",
"birthDate": "2015-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:52.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:52.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aSnS8G6sRV0M0OZv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14056/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14056/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:52.229 [print] {
"resourceType": "Patient",
"id": "14056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:56.881+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JAIME <b>CANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>178911</td></tr><tr><td>Date of birth</td><td><span>01 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "178911"
}
],
"name": [
{
"use": "anonymous",
"text": "JAIME CANO MARTIN",
"family": "CANO",
"given": [
"JAIME"
]
}
],
"telecom": [
{
"system": "email",
"value": "buck.okeefe@heller.biz"
},
{
"system": "phone",
"value": "34 (349) 476-2129"
}
],
"gender": "male",
"birthDate": "2015-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:52.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:52.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:52.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aSnS8G6sRV0M0OZv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14056/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:40:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14056/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:52.229 [print] {
"resourceType": "Patient",
"id": "14056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:56.881+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JAIME <b>CANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>178911</td></tr><tr><td>Date of birth</td><td><span>01 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "178911"
}
],
"name": [
{
"use": "anonymous",
"text": "JAIME CANO MARTIN",
"family": "CANO",
"given": [
"JAIME"
]
}
],
"telecom": [
{
"system": "email",
"value": "buck.okeefe@heller.biz"
},
{
"system": "phone",
"value": "34 (349) 476-2129"
}
],
"gender": "male",
"birthDate": "2015-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:52.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:53.851 [print] {
"resourceType": "Patient",
"id": "14056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:40:56.881+02:00",
"source": "#aSnS8G6sRV0M0OZv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JAIME <b>CANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>178911</td></tr><tr><td>Date of birth</td><td><span>01 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "178911"
}
],
"name": [
{
"use": "anonymous",
"text": "JAIME CANO MARTIN",
"family": "CANO",
"given": [
"JAIME"
]
}
],
"telecom": [
{
"system": "email",
"value": "buck.okeefe@heller.biz"
},
{
"system": "phone",
"value": "34 (349) 476-2129"
}
],
"gender": "male",
"birthDate": "2015-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:54.474 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:55.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:40:59.139+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:40:59.139+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:55.091 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIAZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "174638"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA BELEN IBAÑEZ DIAZ",
"family": "IBAÑEZ",
"given": [
"ANA BELEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "rice.glenna@gmail.com"
},
{
"system": "phone",
"value": "34 (330) 874-5030"
}
],
"gender": "female",
"birthDate": "2015-06-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:55.750 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:55.750 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I9xGhRHoxzIOuKMu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14057/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14057/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:55.750 [print] {
"resourceType": "Patient",
"id": "14057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:00.401+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA BELEN <b>IBAÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>174638</td></tr><tr><td>Date of birth</td><td><span>05 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIAZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "174638"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA BELEN IBAÑEZ DIAZ",
"family": "IBAÑEZ",
"given": [
"ANA BELEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "rice.glenna@gmail.com"
},
{
"system": "phone",
"value": "34 (330) 874-5030"
}
],
"gender": "female",
"birthDate": "2015-06-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:55.750 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:55.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:55.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I9xGhRHoxzIOuKMu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14057/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14057/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:40:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:55.766 [print] {
"resourceType": "Patient",
"id": "14057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:00.401+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA BELEN <b>IBAÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>174638</td></tr><tr><td>Date of birth</td><td><span>05 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIAZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "174638"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA BELEN IBAÑEZ DIAZ",
"family": "IBAÑEZ",
"given": [
"ANA BELEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "rice.glenna@gmail.com"
},
{
"system": "phone",
"value": "34 (330) 874-5030"
}
],
"gender": "female",
"birthDate": "2015-06-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:55.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:56.339 [print] {
"resourceType": "Patient",
"id": "14057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:00.401+02:00",
"source": "#I9xGhRHoxzIOuKMu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA BELEN <b>IBAÑEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>174638</td></tr><tr><td>Date of birth</td><td><span>05 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIAZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "174638"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA BELEN IBAÑEZ DIAZ",
"family": "IBAÑEZ",
"given": [
"ANA BELEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "rice.glenna@gmail.com"
},
{
"system": "phone",
"value": "34 (330) 874-5030"
}
],
"gender": "female",
"birthDate": "2015-06-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:56.988 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:40:57.806 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:01.659+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:01.659+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:40:57.821 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CORTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "124355"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSEP ARIAS CORTES",
"family": "ARIAS",
"given": [
"JOSEP"
]
}
],
"telecom": [
{
"system": "email",
"value": "istark@maggio.biz"
},
{
"system": "phone",
"value": "34 (421) 836-6600"
}
],
"gender": "male",
"birthDate": "2015-08-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:58.460 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:58.460 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TEmcgQubZ1Wd7bpb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14058/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14058/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:58.460 [print] {
"resourceType": "Patient",
"id": "14058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:03.106+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSEP <b>ARIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>124355</td></tr><tr><td>Date of birth</td><td><span>07 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CORTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "124355"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSEP ARIAS CORTES",
"family": "ARIAS",
"given": [
"JOSEP"
]
}
],
"telecom": [
{
"system": "email",
"value": "istark@maggio.biz"
},
{
"system": "phone",
"value": "34 (421) 836-6600"
}
],
"gender": "male",
"birthDate": "2015-08-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:58.460 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:40:58.460 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:40:58.460 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TEmcgQubZ1Wd7bpb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14058/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14058/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:40:58.460 [print] {
"resourceType": "Patient",
"id": "14058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:03.106+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSEP <b>ARIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>124355</td></tr><tr><td>Date of birth</td><td><span>07 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CORTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "124355"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSEP ARIAS CORTES",
"family": "ARIAS",
"given": [
"JOSEP"
]
}
],
"telecom": [
{
"system": "email",
"value": "istark@maggio.biz"
},
{
"system": "phone",
"value": "34 (421) 836-6600"
}
],
"gender": "male",
"birthDate": "2015-08-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:40:58.460 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:40:59.093 [print] {
"resourceType": "Patient",
"id": "14058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:03.106+02:00",
"source": "#TEmcgQubZ1Wd7bpb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSEP <b>ARIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>124355</td></tr><tr><td>Date of birth</td><td><span>07 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CORTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "124355"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSEP ARIAS CORTES",
"family": "ARIAS",
"given": [
"JOSEP"
]
}
],
"telecom": [
{
"system": "email",
"value": "istark@maggio.biz"
},
{
"system": "phone",
"value": "34 (421) 836-6600"
}
],
"gender": "male",
"birthDate": "2015-08-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:40:59.695 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:00.335 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:04.368+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:04.368+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:00.335 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "174491"
}
],
"name": [
{
"use": "anonymous",
"text": "IRENE MARIN NIETO",
"family": "MARIN",
"given": [
"IRENE"
]
}
],
"telecom": [
{
"system": "email",
"value": "enos74@hotmail.com"
},
{
"system": "phone",
"value": "34 (451) 705-6876"
}
],
"gender": "female",
"birthDate": "2016-02-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:00.952 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"785"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:00.952 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KNQAd4zgck8pRnI1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14059/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14059/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:00.952 [print] {
"resourceType": "Patient",
"id": "14059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:05.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IRENE <b>MARIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>174491</td></tr><tr><td>Date of birth</td><td><span>26 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "174491"
}
],
"name": [
{
"use": "anonymous",
"text": "IRENE MARIN NIETO",
"family": "MARIN",
"given": [
"IRENE"
]
}
],
"telecom": [
{
"system": "email",
"value": "enos74@hotmail.com"
},
{
"system": "phone",
"value": "34 (451) 705-6876"
}
],
"gender": "female",
"birthDate": "2016-02-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:00.952 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:00.952 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"785"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:00.952 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KNQAd4zgck8pRnI1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14059/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14059/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:00.952 [print] {
"resourceType": "Patient",
"id": "14059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:05.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IRENE <b>MARIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>174491</td></tr><tr><td>Date of birth</td><td><span>26 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "174491"
}
],
"name": [
{
"use": "anonymous",
"text": "IRENE MARIN NIETO",
"family": "MARIN",
"given": [
"IRENE"
]
}
],
"telecom": [
{
"system": "email",
"value": "enos74@hotmail.com"
},
{
"system": "phone",
"value": "34 (451) 705-6876"
}
],
"gender": "female",
"birthDate": "2016-02-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:00.952 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:01.569 [print] {
"resourceType": "Patient",
"id": "14059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:05.593+02:00",
"source": "#KNQAd4zgck8pRnI1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IRENE <b>MARIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>174491</td></tr><tr><td>Date of birth</td><td><span>26 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "174491"
}
],
"name": [
{
"use": "anonymous",
"text": "IRENE MARIN NIETO",
"family": "MARIN",
"given": [
"IRENE"
]
}
],
"telecom": [
{
"system": "email",
"value": "enos74@hotmail.com"
},
{
"system": "phone",
"value": "34 (451) 705-6876"
}
],
"gender": "female",
"birthDate": "2016-02-26",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:02.202 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:03.009 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:06.876+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:06.876+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:03.009 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VAZQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "150024"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA PILAR LOPEZ VAZQUEZ",
"family": "LOPEZ",
"given": [
"MARIA PILAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "roman52@ortiz.info"
},
{
"system": "phone",
"value": "34 (882) 901-0041"
}
],
"gender": "female",
"birthDate": "2016-06-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:04.796 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:04.796 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rTlSCp641GgtbrcM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14060/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14060/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:04.796 [print] {
"resourceType": "Patient",
"id": "14060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:09.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA PILAR <b>LOPEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>150024</td></tr><tr><td>Date of birth</td><td><span>13 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VAZQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "150024"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA PILAR LOPEZ VAZQUEZ",
"family": "LOPEZ",
"given": [
"MARIA PILAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "roman52@ortiz.info"
},
{
"system": "phone",
"value": "34 (882) 901-0041"
}
],
"gender": "female",
"birthDate": "2016-06-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:04.796 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:04.796 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:04.796 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rTlSCp641GgtbrcM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14060/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14060/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:04.796 [print] {
"resourceType": "Patient",
"id": "14060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:09.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA PILAR <b>LOPEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>150024</td></tr><tr><td>Date of birth</td><td><span>13 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VAZQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "150024"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA PILAR LOPEZ VAZQUEZ",
"family": "LOPEZ",
"given": [
"MARIA PILAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "roman52@ortiz.info"
},
{
"system": "phone",
"value": "34 (882) 901-0041"
}
],
"gender": "female",
"birthDate": "2016-06-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:04.796 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:05.382 [print] {
"resourceType": "Patient",
"id": "14060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:09.452+02:00",
"source": "#rTlSCp641GgtbrcM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA PILAR <b>LOPEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>150024</td></tr><tr><td>Date of birth</td><td><span>13 June 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VAZQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "150024"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA PILAR LOPEZ VAZQUEZ",
"family": "LOPEZ",
"given": [
"MARIA PILAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "roman52@ortiz.info"
},
{
"system": "phone",
"value": "34 (882) 901-0041"
}
],
"gender": "female",
"birthDate": "2016-06-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:05.999 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 18ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 18ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:06.616 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:10.663+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:10.663+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:06.631 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FUENTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "108824"
}
],
"name": [
{
"use": "anonymous",
"text": "INES HERRERO FUENTES",
"family": "HERRERO",
"given": [
"INES"
]
}
],
"telecom": [
{
"system": "email",
"value": "roob.barbara@hotmail.com"
},
{
"system": "phone",
"value": "34 (279) 930-9137"
}
],
"gender": "female",
"birthDate": "2016-09-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:07.279 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:07.279 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OQcA9ryq8e41trSz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14061/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14061/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:07.279 [print] {
"resourceType": "Patient",
"id": "14061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:11.922+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">INES <b>HERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>108824</td></tr><tr><td>Date of birth</td><td><span>30 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FUENTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "108824"
}
],
"name": [
{
"use": "anonymous",
"text": "INES HERRERO FUENTES",
"family": "HERRERO",
"given": [
"INES"
]
}
],
"telecom": [
{
"system": "email",
"value": "roob.barbara@hotmail.com"
},
{
"system": "phone",
"value": "34 (279) 930-9137"
}
],
"gender": "female",
"birthDate": "2016-09-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:07.279 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:07.279 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:07.279 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OQcA9ryq8e41trSz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14061/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14061/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:07.279 [print] {
"resourceType": "Patient",
"id": "14061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:11.922+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">INES <b>HERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>108824</td></tr><tr><td>Date of birth</td><td><span>30 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FUENTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "108824"
}
],
"name": [
{
"use": "anonymous",
"text": "INES HERRERO FUENTES",
"family": "HERRERO",
"given": [
"INES"
]
}
],
"telecom": [
{
"system": "email",
"value": "roob.barbara@hotmail.com"
},
{
"system": "phone",
"value": "34 (279) 930-9137"
}
],
"gender": "female",
"birthDate": "2016-09-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:07.279 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:07.865 [print] {
"resourceType": "Patient",
"id": "14061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:11.922+02:00",
"source": "#OQcA9ryq8e41trSz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">INES <b>HERRERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>108824</td></tr><tr><td>Date of birth</td><td><span>30 September 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FUENTES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "108824"
}
],
"name": [
{
"use": "anonymous",
"text": "INES HERRERO FUENTES",
"family": "HERRERO",
"given": [
"INES"
]
}
],
"telecom": [
{
"system": "email",
"value": "roob.barbara@hotmail.com"
},
{
"system": "phone",
"value": "34 (279) 930-9137"
}
],
"gender": "female",
"birthDate": "2016-09-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:08.487 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:09.073 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:13.161+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:13.161+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:09.073 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9989"
}
],
"name": [
{
"use": "anonymous",
"text": "INMACULADA VEGA GUERRERO",
"family": "VEGA",
"given": [
"INMACULADA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ezra67@hotmail.com"
},
{
"system": "phone",
"value": "34 (592) 621-7258"
}
],
"gender": "female",
"birthDate": "2017-06-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:09.697 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:09.697 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EM4JMRw8636mFJU1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14062/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14062/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:09.697 [print] {
"resourceType": "Patient",
"id": "14062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:14.333+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">INMACULADA <b>VEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9989</td></tr><tr><td>Date of birth</td><td><span>08 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9989"
}
],
"name": [
{
"use": "anonymous",
"text": "INMACULADA VEGA GUERRERO",
"family": "VEGA",
"given": [
"INMACULADA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ezra67@hotmail.com"
},
{
"system": "phone",
"value": "34 (592) 621-7258"
}
],
"gender": "female",
"birthDate": "2017-06-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:09.697 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:09.697 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:09.697 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EM4JMRw8636mFJU1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14062/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14062/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:09.697 [print] {
"resourceType": "Patient",
"id": "14062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:14.333+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">INMACULADA <b>VEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9989</td></tr><tr><td>Date of birth</td><td><span>08 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9989"
}
],
"name": [
{
"use": "anonymous",
"text": "INMACULADA VEGA GUERRERO",
"family": "VEGA",
"given": [
"INMACULADA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ezra67@hotmail.com"
},
{
"system": "phone",
"value": "34 (592) 621-7258"
}
],
"gender": "female",
"birthDate": "2017-06-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:09.697 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:10.332 [print] {
"resourceType": "Patient",
"id": "14062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:14.333+02:00",
"source": "#EM4JMRw8636mFJU1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">INMACULADA <b>VEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9989</td></tr><tr><td>Date of birth</td><td><span>08 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "9989"
}
],
"name": [
{
"use": "anonymous",
"text": "INMACULADA VEGA GUERRERO",
"family": "VEGA",
"given": [
"INMACULADA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ezra67@hotmail.com"
},
{
"system": "phone",
"value": "34 (592) 621-7258"
}
],
"gender": "female",
"birthDate": "2017-06-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:12.004 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:12.603 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:16.680+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:16.680+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:12.609 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "89957"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIAN DIEZ GIMENEZ",
"family": "DIEZ",
"given": [
"JULIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "isom.orn@gmail.com"
},
{
"system": "phone",
"value": "34 (371) 561-1908"
}
],
"gender": "male",
"birthDate": "2017-07-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:13.210 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:13.210 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J5Ro0nEYgzo9u5fC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14063/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14063/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:13.210 [print] {
"resourceType": "Patient",
"id": "14063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:17.867+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIAN <b>DIEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>89957</td></tr><tr><td>Date of birth</td><td><span>14 July 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "89957"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIAN DIEZ GIMENEZ",
"family": "DIEZ",
"given": [
"JULIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "isom.orn@gmail.com"
},
{
"system": "phone",
"value": "34 (371) 561-1908"
}
],
"gender": "male",
"birthDate": "2017-07-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:13.210 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:13.226 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:13.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J5Ro0nEYgzo9u5fC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14063/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14063/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:13.226 [print] {
"resourceType": "Patient",
"id": "14063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:17.867+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIAN <b>DIEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>89957</td></tr><tr><td>Date of birth</td><td><span>14 July 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "89957"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIAN DIEZ GIMENEZ",
"family": "DIEZ",
"given": [
"JULIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "isom.orn@gmail.com"
},
{
"system": "phone",
"value": "34 (371) 561-1908"
}
],
"gender": "male",
"birthDate": "2017-07-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:13.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:14.874 [print] {
"resourceType": "Patient",
"id": "14063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:17.867+02:00",
"source": "#J5Ro0nEYgzo9u5fC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JULIAN <b>DIEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>89957</td></tr><tr><td>Date of birth</td><td><span>14 July 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "89957"
}
],
"name": [
{
"use": "anonymous",
"text": "JULIAN DIEZ GIMENEZ",
"family": "DIEZ",
"given": [
"JULIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "isom.orn@gmail.com"
},
{
"system": "phone",
"value": "34 (371) 561-1908"
}
],
"gender": "male",
"birthDate": "2017-07-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:15.491 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:16.061 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:20.166+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:20.166+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:16.077 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SOTO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "204323"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA DOLORES GOMEZ SOTO",
"family": "GOMEZ",
"given": [
"MARIA DOLORES"
]
}
],
"telecom": [
{
"system": "email",
"value": "martine.schmidt@harris.net"
},
{
"system": "phone",
"value": "34 (915) 611-4070"
}
],
"gender": "female",
"birthDate": "2012-09-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:16.694 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"807"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:16.694 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L3sAUWDSKKV3nzsI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14064/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14064/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:16.694 [print] {
"resourceType": "Patient",
"id": "14064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:21.344+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA DOLORES <b>GOMEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>204323</td></tr><tr><td>Date of birth</td><td><span>24 September 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SOTO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "204323"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA DOLORES GOMEZ SOTO",
"family": "GOMEZ",
"given": [
"MARIA DOLORES"
]
}
],
"telecom": [
{
"system": "email",
"value": "martine.schmidt@harris.net"
},
{
"system": "phone",
"value": "34 (915) 611-4070"
}
],
"gender": "female",
"birthDate": "2012-09-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:16.694 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:16.694 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"807"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:16.694 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L3sAUWDSKKV3nzsI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14064/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14064/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:16.694 [print] {
"resourceType": "Patient",
"id": "14064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:21.344+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA DOLORES <b>GOMEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>204323</td></tr><tr><td>Date of birth</td><td><span>24 September 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SOTO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "204323"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA DOLORES GOMEZ SOTO",
"family": "GOMEZ",
"given": [
"MARIA DOLORES"
]
}
],
"telecom": [
{
"system": "email",
"value": "martine.schmidt@harris.net"
},
{
"system": "phone",
"value": "34 (915) 611-4070"
}
],
"gender": "female",
"birthDate": "2012-09-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:16.694 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:17.752 [print] {
"resourceType": "Patient",
"id": "14064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:21.344+02:00",
"source": "#L3sAUWDSKKV3nzsI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA DOLORES <b>GOMEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>204323</td></tr><tr><td>Date of birth</td><td><span>24 September 2012</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SOTO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "204323"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA DOLORES GOMEZ SOTO",
"family": "GOMEZ",
"given": [
"MARIA DOLORES"
]
}
],
"telecom": [
{
"system": "email",
"value": "martine.schmidt@harris.net"
},
{
"system": "phone",
"value": "34 (915) 611-4070"
}
],
"gender": "female",
"birthDate": "2012-09-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:18.385 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:19.991 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:23.051+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:23.051+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:19.993 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GONZALEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54638"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MIGUEL FUENTES GONZALEZ",
"family": "FUENTES",
"given": [
"JOSE MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "gislason.sasha@howe.com"
},
{
"system": "phone",
"value": "34 (321) 992-0434"
}
],
"gender": "male",
"birthDate": "2013-01-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:20.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:20.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FSiwWT04qYoCpjIW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14065/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14065/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:20.614 [print] {
"resourceType": "Patient",
"id": "14065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:25.267+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MIGUEL <b>FUENTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54638</td></tr><tr><td>Date of birth</td><td><span>28 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GONZALEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54638"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MIGUEL FUENTES GONZALEZ",
"family": "FUENTES",
"given": [
"JOSE MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "gislason.sasha@howe.com"
},
{
"system": "phone",
"value": "34 (321) 992-0434"
}
],
"gender": "male",
"birthDate": "2013-01-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:20.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:20.617 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:20.617 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FSiwWT04qYoCpjIW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14065/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14065/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:20.617 [print] {
"resourceType": "Patient",
"id": "14065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:25.267+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MIGUEL <b>FUENTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54638</td></tr><tr><td>Date of birth</td><td><span>28 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GONZALEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54638"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MIGUEL FUENTES GONZALEZ",
"family": "FUENTES",
"given": [
"JOSE MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "gislason.sasha@howe.com"
},
{
"system": "phone",
"value": "34 (321) 992-0434"
}
],
"gender": "male",
"birthDate": "2013-01-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:20.617 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:21.251 [print] {
"resourceType": "Patient",
"id": "14065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:25.267+02:00",
"source": "#FSiwWT04qYoCpjIW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MIGUEL <b>FUENTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54638</td></tr><tr><td>Date of birth</td><td><span>28 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GONZALEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54638"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MIGUEL FUENTES GONZALEZ",
"family": "FUENTES",
"given": [
"JOSE MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "gislason.sasha@howe.com"
},
{
"system": "phone",
"value": "34 (321) 992-0434"
}
],
"gender": "male",
"birthDate": "2013-01-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:21.845 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:22.658 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:26.512+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:26.512+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:22.660 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "REYES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "191003"
}
],
"name": [
{
"use": "anonymous",
"text": "RAQUEL VAZQUEZ REYES",
"family": "VAZQUEZ",
"given": [
"RAQUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "emilie.hodkiewicz@yahoo.com"
},
{
"system": "phone",
"value": "34 (637) 203-1310"
}
],
"gender": "female",
"birthDate": "2013-03-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:23.448 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:23.448 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dv4TI25U1FzquqvE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14066/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14066/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:23.449 [print] {
"resourceType": "Patient",
"id": "14066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:28.082+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAQUEL <b>VAZQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>191003</td></tr><tr><td>Date of birth</td><td><span>29 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "REYES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "191003"
}
],
"name": [
{
"use": "anonymous",
"text": "RAQUEL VAZQUEZ REYES",
"family": "VAZQUEZ",
"given": [
"RAQUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "emilie.hodkiewicz@yahoo.com"
},
{
"system": "phone",
"value": "34 (637) 203-1310"
}
],
"gender": "female",
"birthDate": "2013-03-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:23.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:23.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:23.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dv4TI25U1FzquqvE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14066/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14066/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:23.451 [print] {
"resourceType": "Patient",
"id": "14066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:28.082+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAQUEL <b>VAZQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>191003</td></tr><tr><td>Date of birth</td><td><span>29 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "REYES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "191003"
}
],
"name": [
{
"use": "anonymous",
"text": "RAQUEL VAZQUEZ REYES",
"family": "VAZQUEZ",
"given": [
"RAQUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "emilie.hodkiewicz@yahoo.com"
},
{
"system": "phone",
"value": "34 (637) 203-1310"
}
],
"gender": "female",
"birthDate": "2013-03-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:23.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:24.027 [print] {
"resourceType": "Patient",
"id": "14066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:28.082+02:00",
"source": "#Dv4TI25U1FzquqvE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAQUEL <b>VAZQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>191003</td></tr><tr><td>Date of birth</td><td><span>29 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "REYES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "191003"
}
],
"name": [
{
"use": "anonymous",
"text": "RAQUEL VAZQUEZ REYES",
"family": "VAZQUEZ",
"given": [
"RAQUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "emilie.hodkiewicz@yahoo.com"
},
{
"system": "phone",
"value": "34 (637) 203-1310"
}
],
"gender": "female",
"birthDate": "2013-03-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:24.639 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:25.509 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:29.294+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:29.294+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:25.511 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "176672"
}
],
"name": [
{
"use": "anonymous",
"text": "FATIMA PASTOR CABRERA",
"family": "PASTOR",
"given": [
"FATIMA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jared11@yahoo.com"
},
{
"system": "phone",
"value": "34 (318) 930-9618"
}
],
"gender": "female",
"birthDate": "2013-05-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:26.129 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:26.129 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9UmDbtrKIqJJYAqG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14067/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14067/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:26.129 [print] {
"resourceType": "Patient",
"id": "14067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:30.781+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FATIMA <b>PASTOR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>176672</td></tr><tr><td>Date of birth</td><td><span>17 May 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "176672"
}
],
"name": [
{
"use": "anonymous",
"text": "FATIMA PASTOR CABRERA",
"family": "PASTOR",
"given": [
"FATIMA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jared11@yahoo.com"
},
{
"system": "phone",
"value": "34 (318) 930-9618"
}
],
"gender": "female",
"birthDate": "2013-05-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:26.129 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:26.131 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"792"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:26.131 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9UmDbtrKIqJJYAqG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14067/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14067/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:26.131 [print] {
"resourceType": "Patient",
"id": "14067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:30.781+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FATIMA <b>PASTOR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>176672</td></tr><tr><td>Date of birth</td><td><span>17 May 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "176672"
}
],
"name": [
{
"use": "anonymous",
"text": "FATIMA PASTOR CABRERA",
"family": "PASTOR",
"given": [
"FATIMA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jared11@yahoo.com"
},
{
"system": "phone",
"value": "34 (318) 930-9618"
}
],
"gender": "female",
"birthDate": "2013-05-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:26.131 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:26.746 [print] {
"resourceType": "Patient",
"id": "14067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:30.781+02:00",
"source": "#9UmDbtrKIqJJYAqG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FATIMA <b>PASTOR </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>176672</td></tr><tr><td>Date of birth</td><td><span>17 May 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABRERA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "176672"
}
],
"name": [
{
"use": "anonymous",
"text": "FATIMA PASTOR CABRERA",
"family": "PASTOR",
"given": [
"FATIMA"
]
}
],
"telecom": [
{
"system": "email",
"value": "jared11@yahoo.com"
},
{
"system": "phone",
"value": "34 (318) 930-9618"
}
],
"gender": "female",
"birthDate": "2013-05-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:27.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:27.943 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:32.033+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:32.033+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:27.945 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOPEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "79680"
}
],
"name": [
{
"use": "anonymous",
"text": "SUSANA HERRERA LOPEZ",
"family": "HERRERA",
"given": [
"SUSANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "anna.schneider@gmail.com"
},
{
"system": "phone",
"value": "34 (408) 528-4596"
}
],
"gender": "female",
"birthDate": "2013-06-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:28.587 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:28.587 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZADRSK1UzqOpqTq3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14068/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14068/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:28.587 [print] {
"resourceType": "Patient",
"id": "14068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:33.226+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SUSANA <b>HERRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>79680</td></tr><tr><td>Date of birth</td><td><span>28 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOPEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "79680"
}
],
"name": [
{
"use": "anonymous",
"text": "SUSANA HERRERA LOPEZ",
"family": "HERRERA",
"given": [
"SUSANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "anna.schneider@gmail.com"
},
{
"system": "phone",
"value": "34 (408) 528-4596"
}
],
"gender": "female",
"birthDate": "2013-06-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:28.587 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:28.589 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:28.589 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZADRSK1UzqOpqTq3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14068/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14068/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:28.589 [print] {
"resourceType": "Patient",
"id": "14068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:33.226+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SUSANA <b>HERRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>79680</td></tr><tr><td>Date of birth</td><td><span>28 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOPEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "79680"
}
],
"name": [
{
"use": "anonymous",
"text": "SUSANA HERRERA LOPEZ",
"family": "HERRERA",
"given": [
"SUSANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "anna.schneider@gmail.com"
},
{
"system": "phone",
"value": "34 (408) 528-4596"
}
],
"gender": "female",
"birthDate": "2013-06-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:28.589 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:29.203 [print] {
"resourceType": "Patient",
"id": "14068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:33.226+02:00",
"source": "#ZADRSK1UzqOpqTq3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SUSANA <b>HERRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>79680</td></tr><tr><td>Date of birth</td><td><span>28 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOPEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "79680"
}
],
"name": [
{
"use": "anonymous",
"text": "SUSANA HERRERA LOPEZ",
"family": "HERRERA",
"given": [
"SUSANA"
]
}
],
"telecom": [
{
"system": "email",
"value": "anna.schneider@gmail.com"
},
{
"system": "phone",
"value": "34 (408) 528-4596"
}
],
"gender": "female",
"birthDate": "2013-06-28",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:29.832 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:30.631 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:34.494+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:34.494+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:30.633 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "29310"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ROSA SANTIAGO DIEZ",
"family": "SANTIAGO",
"given": [
"MARIA ROSA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ratke.brianne@oreilly.biz"
},
{
"system": "phone",
"value": "34 (336) 335-8564"
}
],
"gender": "female",
"birthDate": "2014-05-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:31.287 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"805"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:31.288 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VHNxbSYPi4UoCAhC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14069/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14069/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:31.288 [print] {
"resourceType": "Patient",
"id": "14069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:35.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ROSA <b>SANTIAGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>29310</td></tr><tr><td>Date of birth</td><td><span>13 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "29310"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ROSA SANTIAGO DIEZ",
"family": "SANTIAGO",
"given": [
"MARIA ROSA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ratke.brianne@oreilly.biz"
},
{
"system": "phone",
"value": "34 (336) 335-8564"
}
],
"gender": "female",
"birthDate": "2014-05-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:31.288 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:31.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"805"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:31.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VHNxbSYPi4UoCAhC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14069/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14069/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:31.290 [print] {
"resourceType": "Patient",
"id": "14069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:35.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ROSA <b>SANTIAGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>29310</td></tr><tr><td>Date of birth</td><td><span>13 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "29310"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ROSA SANTIAGO DIEZ",
"family": "SANTIAGO",
"given": [
"MARIA ROSA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ratke.brianne@oreilly.biz"
},
{
"system": "phone",
"value": "34 (336) 335-8564"
}
],
"gender": "female",
"birthDate": "2014-05-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:31.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:31.879 [print] {
"resourceType": "Patient",
"id": "14069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:35.937+02:00",
"source": "#VHNxbSYPi4UoCAhC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ROSA <b>SANTIAGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>29310</td></tr><tr><td>Date of birth</td><td><span>13 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DIEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "29310"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ROSA SANTIAGO DIEZ",
"family": "SANTIAGO",
"given": [
"MARIA ROSA"
]
}
],
"telecom": [
{
"system": "email",
"value": "ratke.brianne@oreilly.biz"
},
{
"system": "phone",
"value": "34 (336) 335-8564"
}
],
"gender": "female",
"birthDate": "2014-05-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:32.785 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:33.371 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:37.440+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:37.440+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:33.371 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VELASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141208"
}
],
"name": [
{
"use": "anonymous",
"text": "CARMEN GONZALEZ VELASCO",
"family": "GONZALEZ",
"given": [
"CARMEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "douglas.marquis@bashirian.com"
},
{
"system": "phone",
"value": "34 (478) 955-2421"
}
],
"gender": "female",
"birthDate": "2014-05-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:33.976 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:33.976 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kc3vHaoKcHHzUI2L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14070/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14070/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:33.976 [print] {
"resourceType": "Patient",
"id": "14070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:38.637+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARMEN <b>GONZALEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141208</td></tr><tr><td>Date of birth</td><td><span>23 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VELASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141208"
}
],
"name": [
{
"use": "anonymous",
"text": "CARMEN GONZALEZ VELASCO",
"family": "GONZALEZ",
"given": [
"CARMEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "douglas.marquis@bashirian.com"
},
{
"system": "phone",
"value": "34 (478) 955-2421"
}
],
"gender": "female",
"birthDate": "2014-05-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:33.976 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:33.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:33.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kc3vHaoKcHHzUI2L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14070/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14070/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:33.992 [print] {
"resourceType": "Patient",
"id": "14070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:38.637+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARMEN <b>GONZALEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141208</td></tr><tr><td>Date of birth</td><td><span>23 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VELASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141208"
}
],
"name": [
{
"use": "anonymous",
"text": "CARMEN GONZALEZ VELASCO",
"family": "GONZALEZ",
"given": [
"CARMEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "douglas.marquis@bashirian.com"
},
{
"system": "phone",
"value": "34 (478) 955-2421"
}
],
"gender": "female",
"birthDate": "2014-05-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:33.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:34.625 [print] {
"resourceType": "Patient",
"id": "14070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:38.637+02:00",
"source": "#Kc3vHaoKcHHzUI2L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARMEN <b>GONZALEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141208</td></tr><tr><td>Date of birth</td><td><span>23 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VELASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141208"
}
],
"name": [
{
"use": "anonymous",
"text": "CARMEN GONZALEZ VELASCO",
"family": "GONZALEZ",
"given": [
"CARMEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "douglas.marquis@bashirian.com"
},
{
"system": "phone",
"value": "34 (478) 955-2421"
}
],
"gender": "female",
"birthDate": "2014-05-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:35.242 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:35.814 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:39.903+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:39.903+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:35.814 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALVAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "123405"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CRISTINA SOLER ALVAREZ",
"family": "SOLER",
"given": [
"MARIA CRISTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dare.dianna@gmail.com"
},
{
"system": "phone",
"value": "34 (851) 548-7857"
}
],
"gender": "female",
"birthDate": "2015-01-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:36.473 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:36.473 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NSa6JPhpStMAYXks"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14071/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14071/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:36.473 [print] {
"resourceType": "Patient",
"id": "14071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:41.132+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CRISTINA <b>SOLER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>123405</td></tr><tr><td>Date of birth</td><td><span>13 January 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALVAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "123405"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CRISTINA SOLER ALVAREZ",
"family": "SOLER",
"given": [
"MARIA CRISTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dare.dianna@gmail.com"
},
{
"system": "phone",
"value": "34 (851) 548-7857"
}
],
"gender": "female",
"birthDate": "2015-01-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:36.473 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:36.489 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:36.489 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NSa6JPhpStMAYXks"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14071/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14071/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:36.489 [print] {
"resourceType": "Patient",
"id": "14071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:41.132+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CRISTINA <b>SOLER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>123405</td></tr><tr><td>Date of birth</td><td><span>13 January 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALVAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "123405"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CRISTINA SOLER ALVAREZ",
"family": "SOLER",
"given": [
"MARIA CRISTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dare.dianna@gmail.com"
},
{
"system": "phone",
"value": "34 (851) 548-7857"
}
],
"gender": "female",
"birthDate": "2015-01-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:36.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:37.074 [print] {
"resourceType": "Patient",
"id": "14071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:41.132+02:00",
"source": "#NSa6JPhpStMAYXks",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CRISTINA <b>SOLER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>123405</td></tr><tr><td>Date of birth</td><td><span>13 January 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALVAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "123405"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CRISTINA SOLER ALVAREZ",
"family": "SOLER",
"given": [
"MARIA CRISTINA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dare.dianna@gmail.com"
},
{
"system": "phone",
"value": "34 (851) 548-7857"
}
],
"gender": "female",
"birthDate": "2015-01-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:37.754 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:38.339 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:42.432+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:42.432+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:38.339 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "167785"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA MARIA FERNANDEZ VEGA",
"family": "FERNANDEZ",
"given": [
"ANA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "alena44@ondricka.org"
},
{
"system": "phone",
"value": "34 (975) 911-5063"
}
],
"gender": "female",
"birthDate": "2015-03-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:38.995 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:38.995 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fkuBvJXdlNNUj9jV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14072/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14072/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:38.995 [print] {
"resourceType": "Patient",
"id": "14072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:43.639+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA MARIA <b>FERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>167785</td></tr><tr><td>Date of birth</td><td><span>03 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "167785"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA MARIA FERNANDEZ VEGA",
"family": "FERNANDEZ",
"given": [
"ANA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "alena44@ondricka.org"
},
{
"system": "phone",
"value": "34 (975) 911-5063"
}
],
"gender": "female",
"birthDate": "2015-03-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:38.995 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:38.995 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:38.995 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fkuBvJXdlNNUj9jV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14072/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14072/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:38.995 [print] {
"resourceType": "Patient",
"id": "14072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:43.639+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA MARIA <b>FERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>167785</td></tr><tr><td>Date of birth</td><td><span>03 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "167785"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA MARIA FERNANDEZ VEGA",
"family": "FERNANDEZ",
"given": [
"ANA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "alena44@ondricka.org"
},
{
"system": "phone",
"value": "34 (975) 911-5063"
}
],
"gender": "female",
"birthDate": "2015-03-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:38.995 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:39.658 [print] {
"resourceType": "Patient",
"id": "14072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:43.639+02:00",
"source": "#fkuBvJXdlNNUj9jV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANA MARIA <b>FERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>167785</td></tr><tr><td>Date of birth</td><td><span>03 March 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "167785"
}
],
"name": [
{
"use": "anonymous",
"text": "ANA MARIA FERNANDEZ VEGA",
"family": "FERNANDEZ",
"given": [
"ANA MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "alena44@ondricka.org"
},
{
"system": "phone",
"value": "34 (975) 911-5063"
}
],
"gender": "female",
"birthDate": "2015-03-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:40.245 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:40.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:44.919+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:44.919+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:40.878 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARMONA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "67283"
}
],
"name": [
{
"use": "anonymous",
"text": "LIDIA ROJAS CARMONA",
"family": "ROJAS",
"given": [
"LIDIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tcollins@king.com"
},
{
"system": "phone",
"value": "34 (351) 247-9666"
}
],
"gender": "female",
"birthDate": "2015-09-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:41.517 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:41.517 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"huwqoN14eK6Bnjmt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14073/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14073/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:41.517 [print] {
"resourceType": "Patient",
"id": "14073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:46.161+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LIDIA <b>ROJAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>67283</td></tr><tr><td>Date of birth</td><td><span>30 September 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARMONA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "67283"
}
],
"name": [
{
"use": "anonymous",
"text": "LIDIA ROJAS CARMONA",
"family": "ROJAS",
"given": [
"LIDIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tcollins@king.com"
},
{
"system": "phone",
"value": "34 (351) 247-9666"
}
],
"gender": "female",
"birthDate": "2015-09-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:41.517 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:41.517 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:41.517 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"huwqoN14eK6Bnjmt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14073/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14073/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:41.517 [print] {
"resourceType": "Patient",
"id": "14073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:46.161+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LIDIA <b>ROJAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>67283</td></tr><tr><td>Date of birth</td><td><span>30 September 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARMONA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "67283"
}
],
"name": [
{
"use": "anonymous",
"text": "LIDIA ROJAS CARMONA",
"family": "ROJAS",
"given": [
"LIDIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tcollins@king.com"
},
{
"system": "phone",
"value": "34 (351) 247-9666"
}
],
"gender": "female",
"birthDate": "2015-09-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:41.517 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:42.351 [print] {
"resourceType": "Patient",
"id": "14073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:46.161+02:00",
"source": "#huwqoN14eK6Bnjmt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LIDIA <b>ROJAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>67283</td></tr><tr><td>Date of birth</td><td><span>30 September 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARMONA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "67283"
}
],
"name": [
{
"use": "anonymous",
"text": "LIDIA ROJAS CARMONA",
"family": "ROJAS",
"given": [
"LIDIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "tcollins@king.com"
},
{
"system": "phone",
"value": "34 (351) 247-9666"
}
],
"gender": "female",
"birthDate": "2015-09-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:42.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:43.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:47.596+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:47.596+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:43.508 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLARDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "19603"
}
],
"name": [
{
"use": "anonymous",
"text": "SAMUEL PASCUAL GALLARDO",
"family": "PASCUAL",
"given": [
"SAMUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "hirthe.walker@bosco.org"
},
{
"system": "phone",
"value": "34 (719) 595-0146"
}
],
"gender": "male",
"birthDate": "2015-10-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:44.325 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:44.325 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vbapAWUkgRCW7lw6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14074/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14074/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:44.325 [print] {
"resourceType": "Patient",
"id": "14074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:48.976+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SAMUEL <b>PASCUAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>19603</td></tr><tr><td>Date of birth</td><td><span>06 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLARDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "19603"
}
],
"name": [
{
"use": "anonymous",
"text": "SAMUEL PASCUAL GALLARDO",
"family": "PASCUAL",
"given": [
"SAMUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "hirthe.walker@bosco.org"
},
{
"system": "phone",
"value": "34 (719) 595-0146"
}
],
"gender": "male",
"birthDate": "2015-10-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:44.325 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:44.325 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:44.325 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vbapAWUkgRCW7lw6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14074/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14074/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:44.325 [print] {
"resourceType": "Patient",
"id": "14074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:48.976+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SAMUEL <b>PASCUAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>19603</td></tr><tr><td>Date of birth</td><td><span>06 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLARDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "19603"
}
],
"name": [
{
"use": "anonymous",
"text": "SAMUEL PASCUAL GALLARDO",
"family": "PASCUAL",
"given": [
"SAMUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "hirthe.walker@bosco.org"
},
{
"system": "phone",
"value": "34 (719) 595-0146"
}
],
"gender": "male",
"birthDate": "2015-10-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:44.325 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:45.913 [print] {
"resourceType": "Patient",
"id": "14074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:48.976+02:00",
"source": "#vbapAWUkgRCW7lw6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SAMUEL <b>PASCUAL </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>19603</td></tr><tr><td>Date of birth</td><td><span>06 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLARDO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "19603"
}
],
"name": [
{
"use": "anonymous",
"text": "SAMUEL PASCUAL GALLARDO",
"family": "PASCUAL",
"given": [
"SAMUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "hirthe.walker@bosco.org"
},
{
"system": "phone",
"value": "34 (719) 595-0146"
}
],
"gender": "male",
"birthDate": "2015-10-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:46.542 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:47.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:51.211+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:51.211+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:47.136 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOLINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106072"
}
],
"name": [
{
"use": "anonymous",
"text": "MONTSERRAT GARRIDO MOLINA",
"family": "GARRIDO",
"given": [
"MONTSERRAT"
]
}
],
"telecom": [
{
"system": "email",
"value": "dkiehn@yahoo.com"
},
{
"system": "phone",
"value": "34 (408) 393-9274"
}
],
"gender": "female",
"birthDate": "2015-11-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:47.795 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:47.795 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C6h7YEnB9x3bhkJs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14075/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14075/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:47.795 [print] {
"resourceType": "Patient",
"id": "14075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:52.426+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MONTSERRAT <b>GARRIDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106072</td></tr><tr><td>Date of birth</td><td><span>30 November 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOLINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106072"
}
],
"name": [
{
"use": "anonymous",
"text": "MONTSERRAT GARRIDO MOLINA",
"family": "GARRIDO",
"given": [
"MONTSERRAT"
]
}
],
"telecom": [
{
"system": "email",
"value": "dkiehn@yahoo.com"
},
{
"system": "phone",
"value": "34 (408) 393-9274"
}
],
"gender": "female",
"birthDate": "2015-11-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:47.795 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:47.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:47.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C6h7YEnB9x3bhkJs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14075/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14075/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:47.797 [print] {
"resourceType": "Patient",
"id": "14075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:52.426+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MONTSERRAT <b>GARRIDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106072</td></tr><tr><td>Date of birth</td><td><span>30 November 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOLINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106072"
}
],
"name": [
{
"use": "anonymous",
"text": "MONTSERRAT GARRIDO MOLINA",
"family": "GARRIDO",
"given": [
"MONTSERRAT"
]
}
],
"telecom": [
{
"system": "email",
"value": "dkiehn@yahoo.com"
},
{
"system": "phone",
"value": "34 (408) 393-9274"
}
],
"gender": "female",
"birthDate": "2015-11-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:47.798 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:49.822 [print] {
"resourceType": "Patient",
"id": "14075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:52.426+02:00",
"source": "#C6h7YEnB9x3bhkJs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MONTSERRAT <b>GARRIDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>106072</td></tr><tr><td>Date of birth</td><td><span>30 November 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOLINA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "106072"
}
],
"name": [
{
"use": "anonymous",
"text": "MONTSERRAT GARRIDO MOLINA",
"family": "GARRIDO",
"given": [
"MONTSERRAT"
]
}
],
"telecom": [
{
"system": "email",
"value": "dkiehn@yahoo.com"
},
{
"system": "phone",
"value": "34 (408) 393-9274"
}
],
"gender": "female",
"birthDate": "2015-11-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:50.442 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:51.061 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:55.112+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:55.112+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:51.061 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORALES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "4324"
}
],
"name": [
{
"use": "anonymous",
"text": "ENCARNACION IGLESIAS MORALES",
"family": "IGLESIAS",
"given": [
"ENCARNACION"
]
}
],
"telecom": [
{
"system": "email",
"value": "runte.chesley@yahoo.com"
},
{
"system": "phone",
"value": "34 (270) 582-0809"
}
],
"gender": "female",
"birthDate": "2015-12-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:51.662 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:51.662 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9OZGjpNVlybHfAmJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14076/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14076/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:51.662 [print] {
"resourceType": "Patient",
"id": "14076",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:56.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ENCARNACION <b>IGLESIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>4324</td></tr><tr><td>Date of birth</td><td><span>01 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORALES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "4324"
}
],
"name": [
{
"use": "anonymous",
"text": "ENCARNACION IGLESIAS MORALES",
"family": "IGLESIAS",
"given": [
"ENCARNACION"
]
}
],
"telecom": [
{
"system": "email",
"value": "runte.chesley@yahoo.com"
},
{
"system": "phone",
"value": "34 (270) 582-0809"
}
],
"gender": "female",
"birthDate": "2015-12-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:51.662 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:51.662 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:51.662 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9OZGjpNVlybHfAmJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14076/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14076/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:51.662 [print] {
"resourceType": "Patient",
"id": "14076",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:56.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ENCARNACION <b>IGLESIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>4324</td></tr><tr><td>Date of birth</td><td><span>01 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORALES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "4324"
}
],
"name": [
{
"use": "anonymous",
"text": "ENCARNACION IGLESIAS MORALES",
"family": "IGLESIAS",
"given": [
"ENCARNACION"
]
}
],
"telecom": [
{
"system": "email",
"value": "runte.chesley@yahoo.com"
},
{
"system": "phone",
"value": "34 (270) 582-0809"
}
],
"gender": "female",
"birthDate": "2015-12-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:51.662 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:52.633 [print] {
"resourceType": "Patient",
"id": "14076",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:56.315+02:00",
"source": "#9OZGjpNVlybHfAmJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ENCARNACION <b>IGLESIAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>4324</td></tr><tr><td>Date of birth</td><td><span>01 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORALES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "4324"
}
],
"name": [
{
"use": "anonymous",
"text": "ENCARNACION IGLESIAS MORALES",
"family": "IGLESIAS",
"given": [
"ENCARNACION"
]
}
],
"telecom": [
{
"system": "email",
"value": "runte.chesley@yahoo.com"
},
{
"system": "phone",
"value": "34 (270) 582-0809"
}
],
"gender": "female",
"birthDate": "2015-12-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:53.236 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:53.868 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:41:57.909+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:41:57.909+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:53.875 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANCHEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "139580"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ISABEL MUÑOZ SANCHEZ",
"family": "MUÑOZ",
"given": [
"MARIA ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "iwaters@yahoo.com"
},
{
"system": "phone",
"value": "34 (492) 201-2505"
}
],
"gender": "female",
"birthDate": "2016-02-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:54.550 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:54.551 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XgL38lnXsjwyrfIY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14077/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14077/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:54.551 [print] {
"resourceType": "Patient",
"id": "14077",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:59.195+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ISABEL <b>MUÑOZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>139580</td></tr><tr><td>Date of birth</td><td><span>18 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANCHEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "139580"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ISABEL MUÑOZ SANCHEZ",
"family": "MUÑOZ",
"given": [
"MARIA ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "iwaters@yahoo.com"
},
{
"system": "phone",
"value": "34 (492) 201-2505"
}
],
"gender": "female",
"birthDate": "2016-02-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:54.551 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:54.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:54.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XgL38lnXsjwyrfIY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14077/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:41:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14077/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:41:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:54.553 [print] {
"resourceType": "Patient",
"id": "14077",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:59.195+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ISABEL <b>MUÑOZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>139580</td></tr><tr><td>Date of birth</td><td><span>18 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANCHEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "139580"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ISABEL MUÑOZ SANCHEZ",
"family": "MUÑOZ",
"given": [
"MARIA ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "iwaters@yahoo.com"
},
{
"system": "phone",
"value": "34 (492) 201-2505"
}
],
"gender": "female",
"birthDate": "2016-02-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:54.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:55.139 [print] {
"resourceType": "Patient",
"id": "14077",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:41:59.195+02:00",
"source": "#XgL38lnXsjwyrfIY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ISABEL <b>MUÑOZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>139580</td></tr><tr><td>Date of birth</td><td><span>18 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANCHEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "139580"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ISABEL MUÑOZ SANCHEZ",
"family": "MUÑOZ",
"given": [
"MARIA ISABEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "iwaters@yahoo.com"
},
{
"system": "phone",
"value": "34 (492) 201-2505"
}
],
"gender": "female",
"birthDate": "2016-02-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:55.759 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:56.347 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:00.425+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:00.425+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:56.349 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTINEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141211"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA MAR LOZANO MARTINEZ",
"family": "LOZANO",
"given": [
"MARIA MAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "jefferey.denesik@jones.com"
},
{
"system": "phone",
"value": "34 (854) 802-8950"
}
],
"gender": "female",
"birthDate": "2016-03-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:56.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:56.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KP0JghBdFlOEL9iW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14078/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14078/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:56.953 [print] {
"resourceType": "Patient",
"id": "14078",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:01.604+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA MAR <b>LOZANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141211</td></tr><tr><td>Date of birth</td><td><span>14 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTINEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141211"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA MAR LOZANO MARTINEZ",
"family": "LOZANO",
"given": [
"MARIA MAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "jefferey.denesik@jones.com"
},
{
"system": "phone",
"value": "34 (854) 802-8950"
}
],
"gender": "female",
"birthDate": "2016-03-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:56.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:56.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:56.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KP0JghBdFlOEL9iW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14078/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14078/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:56.953 [print] {
"resourceType": "Patient",
"id": "14078",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:01.604+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA MAR <b>LOZANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141211</td></tr><tr><td>Date of birth</td><td><span>14 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTINEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141211"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA MAR LOZANO MARTINEZ",
"family": "LOZANO",
"given": [
"MARIA MAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "jefferey.denesik@jones.com"
},
{
"system": "phone",
"value": "34 (854) 802-8950"
}
],
"gender": "female",
"birthDate": "2016-03-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:56.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:41:57.573 [print] {
"resourceType": "Patient",
"id": "14078",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:01.604+02:00",
"source": "#KP0JghBdFlOEL9iW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA MAR <b>LOZANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141211</td></tr><tr><td>Date of birth</td><td><span>14 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTINEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141211"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA MAR LOZANO MARTINEZ",
"family": "LOZANO",
"given": [
"MARIA MAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "jefferey.denesik@jones.com"
},
{
"system": "phone",
"value": "34 (854) 802-8950"
}
],
"gender": "female",
"birthDate": "2016-03-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:41:58.242 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:41:58.826 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:02.906+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:02.906+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:41:58.826 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOZANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "4269"
}
],
"name": [
{
"use": "anonymous",
"text": "HUGO PRIETO LOZANO",
"family": "PRIETO",
"given": [
"HUGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "koepp.laisha@yahoo.com"
},
{
"system": "phone",
"value": "34 (657) 760-8474"
}
],
"gender": "male",
"birthDate": "2016-04-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:59.443 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:59.443 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4t9Rw0CBz6pDCbub"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14079/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14079/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:59.443 [print] {
"resourceType": "Patient",
"id": "14079",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:04.100+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">HUGO <b>PRIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>4269</td></tr><tr><td>Date of birth</td><td><span>04 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOZANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "4269"
}
],
"name": [
{
"use": "anonymous",
"text": "HUGO PRIETO LOZANO",
"family": "PRIETO",
"given": [
"HUGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "koepp.laisha@yahoo.com"
},
{
"system": "phone",
"value": "34 (657) 760-8474"
}
],
"gender": "male",
"birthDate": "2016-04-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:59.443 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:41:59.443 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:41:59.443 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4t9Rw0CBz6pDCbub"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14079/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14079/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:41:59.443 [print] {
"resourceType": "Patient",
"id": "14079",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:04.100+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">HUGO <b>PRIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>4269</td></tr><tr><td>Date of birth</td><td><span>04 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOZANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "4269"
}
],
"name": [
{
"use": "anonymous",
"text": "HUGO PRIETO LOZANO",
"family": "PRIETO",
"given": [
"HUGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "koepp.laisha@yahoo.com"
},
{
"system": "phone",
"value": "34 (657) 760-8474"
}
],
"gender": "male",
"birthDate": "2016-04-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:41:59.443 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:00.052 [print] {
"resourceType": "Patient",
"id": "14079",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:04.100+02:00",
"source": "#4t9Rw0CBz6pDCbub",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">HUGO <b>PRIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>4269</td></tr><tr><td>Date of birth</td><td><span>04 April 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOZANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "4269"
}
],
"name": [
{
"use": "anonymous",
"text": "HUGO PRIETO LOZANO",
"family": "PRIETO",
"given": [
"HUGO"
]
}
],
"telecom": [
{
"system": "email",
"value": "koepp.laisha@yahoo.com"
},
{
"system": "phone",
"value": "34 (657) 760-8474"
}
],
"gender": "male",
"birthDate": "2016-04-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:00.672 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:01.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:05.342+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:05.342+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:01.292 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "70776"
}
],
"name": [
{
"use": "anonymous",
"text": "DOLORES ALONSO ROMERO",
"family": "ALONSO",
"given": [
"DOLORES"
]
}
],
"telecom": [
{
"system": "email",
"value": "cruickshank.brandy@gmail.com"
},
{
"system": "phone",
"value": "34 (542) 618-0491"
}
],
"gender": "female",
"birthDate": "2016-08-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:02.010 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:02.010 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eT6MNy6w7PgvkQgf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14080/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14080/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:02.010 [print] {
"resourceType": "Patient",
"id": "14080",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:06.646+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DOLORES <b>ALONSO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>70776</td></tr><tr><td>Date of birth</td><td><span>05 August 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "70776"
}
],
"name": [
{
"use": "anonymous",
"text": "DOLORES ALONSO ROMERO",
"family": "ALONSO",
"given": [
"DOLORES"
]
}
],
"telecom": [
{
"system": "email",
"value": "cruickshank.brandy@gmail.com"
},
{
"system": "phone",
"value": "34 (542) 618-0491"
}
],
"gender": "female",
"birthDate": "2016-08-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:02.010 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:02.010 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:02.010 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eT6MNy6w7PgvkQgf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14080/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14080/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:02.010 [print] {
"resourceType": "Patient",
"id": "14080",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:06.646+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DOLORES <b>ALONSO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>70776</td></tr><tr><td>Date of birth</td><td><span>05 August 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "70776"
}
],
"name": [
{
"use": "anonymous",
"text": "DOLORES ALONSO ROMERO",
"family": "ALONSO",
"given": [
"DOLORES"
]
}
],
"telecom": [
{
"system": "email",
"value": "cruickshank.brandy@gmail.com"
},
{
"system": "phone",
"value": "34 (542) 618-0491"
}
],
"gender": "female",
"birthDate": "2016-08-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:02.010 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:03.044 [print] {
"resourceType": "Patient",
"id": "14080",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:06.646+02:00",
"source": "#eT6MNy6w7PgvkQgf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DOLORES <b>ALONSO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>70776</td></tr><tr><td>Date of birth</td><td><span>05 August 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "70776"
}
],
"name": [
{
"use": "anonymous",
"text": "DOLORES ALONSO ROMERO",
"family": "ALONSO",
"given": [
"DOLORES"
]
}
],
"telecom": [
{
"system": "email",
"value": "cruickshank.brandy@gmail.com"
},
{
"system": "phone",
"value": "34 (542) 618-0491"
}
],
"gender": "female",
"birthDate": "2016-08-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:03.632 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:04.214 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:08.307+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:08.307+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:04.217 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRUZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "135772"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN FRANCISCO BENITEZ CRUZ",
"family": "BENITEZ",
"given": [
"JUAN FRANCISCO"
]
}
],
"telecom": [
{
"system": "email",
"value": "durgan.laurel@jacobi.org"
},
{
"system": "phone",
"value": "34 (572) 952-0025"
}
],
"gender": "male",
"birthDate": "2016-11-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:04.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:04.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rihDJyGwqGizMxBv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14081/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14081/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:04.808 [print] {
"resourceType": "Patient",
"id": "14081",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:09.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN FRANCISCO <b>BENITEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>135772</td></tr><tr><td>Date of birth</td><td><span>03 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRUZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "135772"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN FRANCISCO BENITEZ CRUZ",
"family": "BENITEZ",
"given": [
"JUAN FRANCISCO"
]
}
],
"telecom": [
{
"system": "email",
"value": "durgan.laurel@jacobi.org"
},
{
"system": "phone",
"value": "34 (572) 952-0025"
}
],
"gender": "male",
"birthDate": "2016-11-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:04.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:04.810 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:04.810 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rihDJyGwqGizMxBv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14081/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14081/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:04.810 [print] {
"resourceType": "Patient",
"id": "14081",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:09.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN FRANCISCO <b>BENITEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>135772</td></tr><tr><td>Date of birth</td><td><span>03 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRUZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "135772"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN FRANCISCO BENITEZ CRUZ",
"family": "BENITEZ",
"given": [
"JUAN FRANCISCO"
]
}
],
"telecom": [
{
"system": "email",
"value": "durgan.laurel@jacobi.org"
},
{
"system": "phone",
"value": "34 (572) 952-0025"
}
],
"gender": "male",
"birthDate": "2016-11-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:04.810 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:05.432 [print] {
"resourceType": "Patient",
"id": "14081",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:09.458+02:00",
"source": "#rihDJyGwqGizMxBv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN FRANCISCO <b>BENITEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>135772</td></tr><tr><td>Date of birth</td><td><span>03 November 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRUZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "135772"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN FRANCISCO BENITEZ CRUZ",
"family": "BENITEZ",
"given": [
"JUAN FRANCISCO"
]
}
],
"telecom": [
{
"system": "email",
"value": "durgan.laurel@jacobi.org"
},
{
"system": "phone",
"value": "34 (572) 952-0025"
}
],
"gender": "male",
"birthDate": "2016-11-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:06.237 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:06.813 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:10.702+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:10.702+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:06.815 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOZANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "129200"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSA PRIETO LOZANO",
"family": "PRIETO",
"given": [
"ROSA"
]
}
],
"telecom": [
{
"system": "email",
"value": "mmcclure@farrell.net"
},
{
"system": "phone",
"value": "34 (641) 721-4540"
}
],
"gender": "female",
"birthDate": "2017-01-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:07.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:07.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kg7qFftOn9Cgugg7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14082/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14082/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:07.701 [print] {
"resourceType": "Patient",
"id": "14082",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:12.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSA <b>PRIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>129200</td></tr><tr><td>Date of birth</td><td><span>31 January 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOZANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "129200"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSA PRIETO LOZANO",
"family": "PRIETO",
"given": [
"ROSA"
]
}
],
"telecom": [
{
"system": "email",
"value": "mmcclure@farrell.net"
},
{
"system": "phone",
"value": "34 (641) 721-4540"
}
],
"gender": "female",
"birthDate": "2017-01-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:07.702 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:07.703 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:07.703 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kg7qFftOn9Cgugg7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14082/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14082/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:07.703 [print] {
"resourceType": "Patient",
"id": "14082",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:12.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSA <b>PRIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>129200</td></tr><tr><td>Date of birth</td><td><span>31 January 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOZANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "129200"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSA PRIETO LOZANO",
"family": "PRIETO",
"given": [
"ROSA"
]
}
],
"telecom": [
{
"system": "email",
"value": "mmcclure@farrell.net"
},
{
"system": "phone",
"value": "34 (641) 721-4540"
}
],
"gender": "female",
"birthDate": "2017-01-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:07.703 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:08.278 [print] {
"resourceType": "Patient",
"id": "14082",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:12.347+02:00",
"source": "#Kg7qFftOn9Cgugg7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSA <b>PRIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>129200</td></tr><tr><td>Date of birth</td><td><span>31 January 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOZANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "129200"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSA PRIETO LOZANO",
"family": "PRIETO",
"given": [
"ROSA"
]
}
],
"telecom": [
{
"system": "email",
"value": "mmcclure@farrell.net"
},
{
"system": "phone",
"value": "34 (641) 721-4540"
}
],
"gender": "female",
"birthDate": "2017-01-31",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:09.109 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:09.695 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:13.576+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:13.576+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:09.695 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100828"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JOSEFA CALVO HERRERO",
"family": "CALVO",
"given": [
"MARIA JOSEFA"
]
}
],
"telecom": [
{
"system": "email",
"value": "brice25@gmail.com"
},
{
"system": "phone",
"value": "34 (941) 609-7302"
}
],
"gender": "female",
"birthDate": "2017-02-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:10.331 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:10.331 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mJN2ckIwc6SutyFm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14083/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14083/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:10.331 [print] {
"resourceType": "Patient",
"id": "14083",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:14.980+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JOSEFA <b>CALVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100828</td></tr><tr><td>Date of birth</td><td><span>01 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100828"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JOSEFA CALVO HERRERO",
"family": "CALVO",
"given": [
"MARIA JOSEFA"
]
}
],
"telecom": [
{
"system": "email",
"value": "brice25@gmail.com"
},
{
"system": "phone",
"value": "34 (941) 609-7302"
}
],
"gender": "female",
"birthDate": "2017-02-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:10.331 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:10.331 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:10.331 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mJN2ckIwc6SutyFm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14083/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14083/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:10.331 [print] {
"resourceType": "Patient",
"id": "14083",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:14.980+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JOSEFA <b>CALVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100828</td></tr><tr><td>Date of birth</td><td><span>01 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100828"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JOSEFA CALVO HERRERO",
"family": "CALVO",
"given": [
"MARIA JOSEFA"
]
}
],
"telecom": [
{
"system": "email",
"value": "brice25@gmail.com"
},
{
"system": "phone",
"value": "34 (941) 609-7302"
}
],
"gender": "female",
"birthDate": "2017-02-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:10.331 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:10.959 [print] {
"resourceType": "Patient",
"id": "14083",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:14.980+02:00",
"source": "#mJN2ckIwc6SutyFm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JOSEFA <b>CALVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>100828</td></tr><tr><td>Date of birth</td><td><span>01 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "100828"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JOSEFA CALVO HERRERO",
"family": "CALVO",
"given": [
"MARIA JOSEFA"
]
}
],
"telecom": [
{
"system": "email",
"value": "brice25@gmail.com"
},
{
"system": "phone",
"value": "34 (941) 609-7302"
}
],
"gender": "female",
"birthDate": "2017-02-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:11.560 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:12.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:16.231+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:16.231+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:12.161 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "JIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "205967"
}
],
"name": [
{
"use": "anonymous",
"text": "RICARDO LEON JIMENEZ",
"family": "LEON",
"given": [
"RICARDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "nlang@bechtelar.com"
},
{
"system": "phone",
"value": "34 (618) 291-9571"
}
],
"gender": "male",
"birthDate": "2017-03-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:12.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:12.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KmfmYDWPxCfFhr6q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14084/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14084/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:12.777 [print] {
"resourceType": "Patient",
"id": "14084",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:17.442+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RICARDO <b>LEON </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>205967</td></tr><tr><td>Date of birth</td><td><span>07 March 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "JIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "205967"
}
],
"name": [
{
"use": "anonymous",
"text": "RICARDO LEON JIMENEZ",
"family": "LEON",
"given": [
"RICARDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "nlang@bechtelar.com"
},
{
"system": "phone",
"value": "34 (618) 291-9571"
}
],
"gender": "male",
"birthDate": "2017-03-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:12.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:12.793 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:12.793 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KmfmYDWPxCfFhr6q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14084/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14084/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:12.793 [print] {
"resourceType": "Patient",
"id": "14084",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:17.442+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RICARDO <b>LEON </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>205967</td></tr><tr><td>Date of birth</td><td><span>07 March 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "JIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "205967"
}
],
"name": [
{
"use": "anonymous",
"text": "RICARDO LEON JIMENEZ",
"family": "LEON",
"given": [
"RICARDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "nlang@bechtelar.com"
},
{
"system": "phone",
"value": "34 (618) 291-9571"
}
],
"gender": "male",
"birthDate": "2017-03-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:12.793 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:13.364 [print] {
"resourceType": "Patient",
"id": "14084",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:17.442+02:00",
"source": "#KmfmYDWPxCfFhr6q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RICARDO <b>LEON </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>205967</td></tr><tr><td>Date of birth</td><td><span>07 March 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "JIMENEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "205967"
}
],
"name": [
{
"use": "anonymous",
"text": "RICARDO LEON JIMENEZ",
"family": "LEON",
"given": [
"RICARDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "nlang@bechtelar.com"
},
{
"system": "phone",
"value": "34 (618) 291-9571"
}
],
"gender": "male",
"birthDate": "2017-03-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:14.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:14.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:18.681+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:18.681+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:14.587 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARRASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "63953"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIANO VICENTE CARRASCO",
"family": "VICENTE",
"given": [
"MARIANO"
]
}
],
"telecom": [
{
"system": "email",
"value": "cristopher81@pfeffer.com"
},
{
"system": "phone",
"value": "34 (491) 855-3274"
}
],
"gender": "male",
"birthDate": "2017-06-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:15.214 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:15.214 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UurtqjcSrPAifLuN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14085/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14085/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:15.214 [print] {
"resourceType": "Patient",
"id": "14085",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:19.868+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIANO <b>VICENTE </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>63953</td></tr><tr><td>Date of birth</td><td><span>01 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARRASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "63953"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIANO VICENTE CARRASCO",
"family": "VICENTE",
"given": [
"MARIANO"
]
}
],
"telecom": [
{
"system": "email",
"value": "cristopher81@pfeffer.com"
},
{
"system": "phone",
"value": "34 (491) 855-3274"
}
],
"gender": "male",
"birthDate": "2017-06-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:15.214 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:15.214 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:15.214 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UurtqjcSrPAifLuN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14085/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14085/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:15.214 [print] {
"resourceType": "Patient",
"id": "14085",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:19.868+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIANO <b>VICENTE </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>63953</td></tr><tr><td>Date of birth</td><td><span>01 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARRASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "63953"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIANO VICENTE CARRASCO",
"family": "VICENTE",
"given": [
"MARIANO"
]
}
],
"telecom": [
{
"system": "email",
"value": "cristopher81@pfeffer.com"
},
{
"system": "phone",
"value": "34 (491) 855-3274"
}
],
"gender": "male",
"birthDate": "2017-06-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:15.214 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:15.793 [print] {
"resourceType": "Patient",
"id": "14085",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:19.868+02:00",
"source": "#UurtqjcSrPAifLuN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIANO <b>VICENTE </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>63953</td></tr><tr><td>Date of birth</td><td><span>01 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARRASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "63953"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIANO VICENTE CARRASCO",
"family": "VICENTE",
"given": [
"MARIANO"
]
}
],
"telecom": [
{
"system": "email",
"value": "cristopher81@pfeffer.com"
},
{
"system": "phone",
"value": "34 (491) 855-3274"
}
],
"gender": "male",
"birthDate": "2017-06-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:16.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:16.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:21.046+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:21.046+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:16.957 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "110450"
}
],
"name": [
{
"use": "anonymous",
"text": "CONCEPCION MORALES PEREZ",
"family": "MORALES",
"given": [
"CONCEPCION"
]
}
],
"telecom": [
{
"system": "email",
"value": "eduardo85@schiller.com"
},
{
"system": "phone",
"value": "34 (746) 494-8006"
}
],
"gender": "female",
"birthDate": "2017-06-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:17.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:17.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bapShkXjrPK9YrcX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14086/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14086/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:17.604 [print] {
"resourceType": "Patient",
"id": "14086",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:22.249+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CONCEPCION <b>MORALES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>110450</td></tr><tr><td>Date of birth</td><td><span>23 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "110450"
}
],
"name": [
{
"use": "anonymous",
"text": "CONCEPCION MORALES PEREZ",
"family": "MORALES",
"given": [
"CONCEPCION"
]
}
],
"telecom": [
{
"system": "email",
"value": "eduardo85@schiller.com"
},
{
"system": "phone",
"value": "34 (746) 494-8006"
}
],
"gender": "female",
"birthDate": "2017-06-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:17.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:17.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:17.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bapShkXjrPK9YrcX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14086/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14086/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:17.606 [print] {
"resourceType": "Patient",
"id": "14086",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:22.249+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CONCEPCION <b>MORALES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>110450</td></tr><tr><td>Date of birth</td><td><span>23 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "110450"
}
],
"name": [
{
"use": "anonymous",
"text": "CONCEPCION MORALES PEREZ",
"family": "MORALES",
"given": [
"CONCEPCION"
]
}
],
"telecom": [
{
"system": "email",
"value": "eduardo85@schiller.com"
},
{
"system": "phone",
"value": "34 (746) 494-8006"
}
],
"gender": "female",
"birthDate": "2017-06-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:17.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:18.227 [print] {
"resourceType": "Patient",
"id": "14086",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:22.249+02:00",
"source": "#bapShkXjrPK9YrcX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CONCEPCION <b>MORALES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>110450</td></tr><tr><td>Date of birth</td><td><span>23 June 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "110450"
}
],
"name": [
{
"use": "anonymous",
"text": "CONCEPCION MORALES PEREZ",
"family": "MORALES",
"given": [
"CONCEPCION"
]
}
],
"telecom": [
{
"system": "email",
"value": "eduardo85@schiller.com"
},
{
"system": "phone",
"value": "34 (746) 494-8006"
}
],
"gender": "female",
"birthDate": "2017-06-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:18.822 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:19.408 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:23.489+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:23.489+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:19.408 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SUAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "96894"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE ANTONIO PEREZ SUAREZ",
"family": "PEREZ",
"given": [
"JOSE ANTONIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "maynard53@gmail.com"
}
],
"gender": "male",
"birthDate": "2017-08-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:19.993 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"752"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:19.993 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"socVDxP5vuXfCf1z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14087/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14087/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:19.993 [print] {
"resourceType": "Patient",
"id": "14087",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:24.653+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE ANTONIO <b>PEREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>96894</td></tr><tr><td>Date of birth</td><td><span>25 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SUAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "96894"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE ANTONIO PEREZ SUAREZ",
"family": "PEREZ",
"given": [
"JOSE ANTONIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "maynard53@gmail.com"
}
],
"gender": "male",
"birthDate": "2017-08-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:19.993 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:19.993 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"752"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:19.993 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"socVDxP5vuXfCf1z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14087/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14087/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:19.993 [print] {
"resourceType": "Patient",
"id": "14087",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:24.653+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE ANTONIO <b>PEREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>96894</td></tr><tr><td>Date of birth</td><td><span>25 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SUAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "96894"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE ANTONIO PEREZ SUAREZ",
"family": "PEREZ",
"given": [
"JOSE ANTONIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "maynard53@gmail.com"
}
],
"gender": "male",
"birthDate": "2017-08-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:19.993 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:20.553 [print] {
"resourceType": "Patient",
"id": "14087",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:24.653+02:00",
"source": "#socVDxP5vuXfCf1z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE ANTONIO <b>PEREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>96894</td></tr><tr><td>Date of birth</td><td><span>25 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SUAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "96894"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE ANTONIO PEREZ SUAREZ",
"family": "PEREZ",
"given": [
"JOSE ANTONIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "maynard53@gmail.com"
}
],
"gender": "male",
"birthDate": "2017-08-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:21.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:21.989 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:25.869+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:25.869+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:21.989 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTILLO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "189254"
}
],
"name": [
{
"use": "anonymous",
"text": "CESAR CARMONA CASTILLO",
"family": "CARMONA",
"given": [
"CESAR"
]
}
],
"telecom": [
{
"system": "email",
"value": "davonte78@hotmail.com"
},
{
"system": "phone",
"value": "34 (562) 731-2763"
}
],
"gender": "male",
"birthDate": "2017-10-1",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
status code was: 400, expected: 201, response time in milliseconds: 636, url: https://psp-sp-fhir.prep.sanit.cineca.it/fhir/Patient, response:
{
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "(div xmlns=\"http://www.w3.org/1999/xhtml\")(h1)Operation Outcome(/h1)(table border=\"0\")(tr)(td style=\"font-weight: bold;\")ERROR(/td)(td)[](/td)(td)(pre)Failed to parse request body as JSON resource. Error was: [element="birthDate"] Invalid attribute value "2017-10-1": Invalid date/time format: "2017-10-1"(/pre)(/td)\n\t\t\t(/tr)\n\t\t(/table)\n\t(/div)"
},
"issue": [ {
"severity": "error",
"code": "processing",
"diagnostics": "Failed to parse request body as JSON resource. Error was: [element=\"birthDate\"] Invalid attribute value \"2017-10-1\": Invalid date/time format: \"2017-10-1\""
} ]
}
karate/src/features/api/xaa.feature:20
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:22.625 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALONSO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45223"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN LUIS GALLARDO ALONSO",
"family": "GALLARDO",
"given": [
"JUAN LUIS"
]
}
],
"telecom": [
{
"system": "email",
"value": "evangeline.crooks@mclaughlin.net"
},
{
"system": "phone",
"value": "34 (255) 853-0655"
}
],
"gender": "male",
"birthDate": "2013-01-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:23.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"812"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:23.474 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9rRRtNdY6nb7EJeI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14088/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14088/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:23.474 [print] {
"resourceType": "Patient",
"id": "14088",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:28.122+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN LUIS <b>GALLARDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45223</td></tr><tr><td>Date of birth</td><td><span>03 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALONSO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45223"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN LUIS GALLARDO ALONSO",
"family": "GALLARDO",
"given": [
"JUAN LUIS"
]
}
],
"telecom": [
{
"system": "email",
"value": "evangeline.crooks@mclaughlin.net"
},
{
"system": "phone",
"value": "34 (255) 853-0655"
}
],
"gender": "male",
"birthDate": "2013-01-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:23.474 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:23.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"812"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:23.474 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9rRRtNdY6nb7EJeI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14088/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14088/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:23.474 [print] {
"resourceType": "Patient",
"id": "14088",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:28.122+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN LUIS <b>GALLARDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45223</td></tr><tr><td>Date of birth</td><td><span>03 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALONSO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45223"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN LUIS GALLARDO ALONSO",
"family": "GALLARDO",
"given": [
"JUAN LUIS"
]
}
],
"telecom": [
{
"system": "email",
"value": "evangeline.crooks@mclaughlin.net"
},
{
"system": "phone",
"value": "34 (255) 853-0655"
}
],
"gender": "male",
"birthDate": "2013-01-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:23.474 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:24.090 [print] {
"resourceType": "Patient",
"id": "14088",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:28.122+02:00",
"source": "#9rRRtNdY6nb7EJeI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN LUIS <b>GALLARDO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45223</td></tr><tr><td>Date of birth</td><td><span>03 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALONSO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45223"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN LUIS GALLARDO ALONSO",
"family": "GALLARDO",
"given": [
"JUAN LUIS"
]
}
],
"telecom": [
{
"system": "email",
"value": "evangeline.crooks@mclaughlin.net"
},
{
"system": "phone",
"value": "34 (255) 853-0655"
}
],
"gender": "male",
"birthDate": "2013-01-03",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:24.993 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:25.597 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:29.663+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:29.663+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:25.612 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALVAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "11993"
}
],
"name": [
{
"use": "anonymous",
"text": "XAVIER SOLER ALVAREZ",
"family": "SOLER",
"given": [
"XAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "hartmann.pierre@yahoo.com"
},
{
"system": "phone",
"value": "34 (653) 873-3477"
}
],
"gender": "male",
"birthDate": "2013-01-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:26.209 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:26.209 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"igwAp2rHjAV9cKcf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14089/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14089/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:26.209 [print] {
"resourceType": "Patient",
"id": "14089",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:30.862+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">XAVIER <b>SOLER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>11993</td></tr><tr><td>Date of birth</td><td><span>24 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALVAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "11993"
}
],
"name": [
{
"use": "anonymous",
"text": "XAVIER SOLER ALVAREZ",
"family": "SOLER",
"given": [
"XAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "hartmann.pierre@yahoo.com"
},
{
"system": "phone",
"value": "34 (653) 873-3477"
}
],
"gender": "male",
"birthDate": "2013-01-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:26.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:26.209 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:26.209 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"igwAp2rHjAV9cKcf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14089/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14089/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:26.209 [print] {
"resourceType": "Patient",
"id": "14089",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:30.862+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">XAVIER <b>SOLER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>11993</td></tr><tr><td>Date of birth</td><td><span>24 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALVAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "11993"
}
],
"name": [
{
"use": "anonymous",
"text": "XAVIER SOLER ALVAREZ",
"family": "SOLER",
"given": [
"XAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "hartmann.pierre@yahoo.com"
},
{
"system": "phone",
"value": "34 (653) 873-3477"
}
],
"gender": "male",
"birthDate": "2013-01-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:26.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:26.808 [print] {
"resourceType": "Patient",
"id": "14089",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:30.862+02:00",
"source": "#igwAp2rHjAV9cKcf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">XAVIER <b>SOLER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>11993</td></tr><tr><td>Date of birth</td><td><span>24 January 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ALVAREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "11993"
}
],
"name": [
{
"use": "anonymous",
"text": "XAVIER SOLER ALVAREZ",
"family": "SOLER",
"given": [
"XAVIER"
]
}
],
"telecom": [
{
"system": "email",
"value": "hartmann.pierre@yahoo.com"
},
{
"system": "phone",
"value": "34 (653) 873-3477"
}
],
"gender": "male",
"birthDate": "2013-01-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:27.448 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:28.077 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:32.113+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:32.113+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:28.078 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABALLERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "203565"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTOR MANUEL VELASCO CABALLERO",
"family": "VELASCO",
"given": [
"VICTOR MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "carissa49@hotmail.com"
},
{
"system": "phone",
"value": "34 (891) 927-3690"
}
],
"gender": "male",
"birthDate": "2013-03-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:28.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"814"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:28.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NkKinPMcLTKZXQ9c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14090/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14090/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:28.739 [print] {
"resourceType": "Patient",
"id": "14090",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:33.381+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTOR MANUEL <b>VELASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>203565</td></tr><tr><td>Date of birth</td><td><span>14 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABALLERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "203565"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTOR MANUEL VELASCO CABALLERO",
"family": "VELASCO",
"given": [
"VICTOR MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "carissa49@hotmail.com"
},
{
"system": "phone",
"value": "34 (891) 927-3690"
}
],
"gender": "male",
"birthDate": "2013-03-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:28.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:28.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"814"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:28.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NkKinPMcLTKZXQ9c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14090/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14090/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:28.739 [print] {
"resourceType": "Patient",
"id": "14090",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:33.381+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTOR MANUEL <b>VELASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>203565</td></tr><tr><td>Date of birth</td><td><span>14 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABALLERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "203565"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTOR MANUEL VELASCO CABALLERO",
"family": "VELASCO",
"given": [
"VICTOR MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "carissa49@hotmail.com"
},
{
"system": "phone",
"value": "34 (891) 927-3690"
}
],
"gender": "male",
"birthDate": "2013-03-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:28.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:29.376 [print] {
"resourceType": "Patient",
"id": "14090",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:33.381+02:00",
"source": "#NkKinPMcLTKZXQ9c",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTOR MANUEL <b>VELASCO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>203565</td></tr><tr><td>Date of birth</td><td><span>14 March 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CABALLERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "203565"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTOR MANUEL VELASCO CABALLERO",
"family": "VELASCO",
"given": [
"VICTOR MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "carissa49@hotmail.com"
},
{
"system": "phone",
"value": "34 (891) 927-3690"
}
],
"gender": "male",
"birthDate": "2013-03-14",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:29.978 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:30.547 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:34.635+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:34.635+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:30.548 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "205397"
}
],
"name": [
{
"use": "anonymous",
"text": "ENRIQUE MARIN NIETO",
"family": "MARIN",
"given": [
"ENRIQUE"
]
}
],
"telecom": [
{
"system": "email",
"value": "jalon.fay@friesen.com"
},
{
"system": "phone",
"value": "34 (227) 657-8490"
}
],
"gender": "male",
"birthDate": "2013-06-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:31.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:31.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DuV8pVSb7T7DViv9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14091/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14091/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:31.156 [print] {
"resourceType": "Patient",
"id": "14091",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:35.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ENRIQUE <b>MARIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>205397</td></tr><tr><td>Date of birth</td><td><span>04 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "205397"
}
],
"name": [
{
"use": "anonymous",
"text": "ENRIQUE MARIN NIETO",
"family": "MARIN",
"given": [
"ENRIQUE"
]
}
],
"telecom": [
{
"system": "email",
"value": "jalon.fay@friesen.com"
},
{
"system": "phone",
"value": "34 (227) 657-8490"
}
],
"gender": "male",
"birthDate": "2013-06-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:31.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:31.158 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:31.158 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DuV8pVSb7T7DViv9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14091/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14091/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:31.158 [print] {
"resourceType": "Patient",
"id": "14091",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:35.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ENRIQUE <b>MARIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>205397</td></tr><tr><td>Date of birth</td><td><span>04 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "205397"
}
],
"name": [
{
"use": "anonymous",
"text": "ENRIQUE MARIN NIETO",
"family": "MARIN",
"given": [
"ENRIQUE"
]
}
],
"telecom": [
{
"system": "email",
"value": "jalon.fay@friesen.com"
},
{
"system": "phone",
"value": "34 (227) 657-8490"
}
],
"gender": "male",
"birthDate": "2013-06-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:31.158 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:31.770 [print] {
"resourceType": "Patient",
"id": "14091",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:35.806+02:00",
"source": "#DuV8pVSb7T7DViv9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ENRIQUE <b>MARIN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>205397</td></tr><tr><td>Date of birth</td><td><span>04 June 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NIETO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "205397"
}
],
"name": [
{
"use": "anonymous",
"text": "ENRIQUE MARIN NIETO",
"family": "MARIN",
"given": [
"ENRIQUE"
]
}
],
"telecom": [
{
"system": "email",
"value": "jalon.fay@friesen.com"
},
{
"system": "phone",
"value": "34 (227) 657-8490"
}
],
"gender": "male",
"birthDate": "2013-06-04",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:32.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:32.997 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:37.053+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:37.053+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:33.000 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VELASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "162108"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE GONZALEZ VELASCO",
"family": "GONZALEZ",
"given": [
"JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "ernser.johnathon@fritsch.net"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:33.672 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"729"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:33.672 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZqGfzELOMgzL3QMr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14092/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14092/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:33.672 [print] {
"resourceType": "Patient",
"id": "14092",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:38.327+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE <b>GONZALEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>162108</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VELASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "162108"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE GONZALEZ VELASCO",
"family": "GONZALEZ",
"given": [
"JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "ernser.johnathon@fritsch.net"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:33.672 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:33.672 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"729"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:33.672 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZqGfzELOMgzL3QMr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14092/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14092/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:33.672 [print] {
"resourceType": "Patient",
"id": "14092",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:38.327+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE <b>GONZALEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>162108</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VELASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "162108"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE GONZALEZ VELASCO",
"family": "GONZALEZ",
"given": [
"JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "ernser.johnathon@fritsch.net"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:33.672 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:35.257 [print] {
"resourceType": "Patient",
"id": "14092",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:38.327+02:00",
"source": "#ZqGfzELOMgzL3QMr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE <b>GONZALEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>162108</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VELASCO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "162108"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE GONZALEZ VELASCO",
"family": "GONZALEZ",
"given": [
"JOSE"
]
}
],
"telecom": [
{
"system": "email",
"value": "ernser.johnathon@fritsch.net"
}
],
"gender": "male",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:35.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:36.498 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:40.560+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:40.560+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:36.499 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NAVARRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98049"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSARIO RUBIO NAVARRO",
"family": "RUBIO",
"given": [
"ROSARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "garrett.bergstrom@barrows.com"
},
{
"system": "phone",
"value": "34 (272) 856-7643"
}
],
"gender": "female",
"birthDate": "2013-10-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:37.112 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:37.112 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"opKa5r41fs73XPLS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14093/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14093/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:37.112 [print] {
"resourceType": "Patient",
"id": "14093",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:41.760+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSARIO <b>RUBIO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98049</td></tr><tr><td>Date of birth</td><td><span>09 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NAVARRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98049"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSARIO RUBIO NAVARRO",
"family": "RUBIO",
"given": [
"ROSARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "garrett.bergstrom@barrows.com"
},
{
"system": "phone",
"value": "34 (272) 856-7643"
}
],
"gender": "female",
"birthDate": "2013-10-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:37.112 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:37.114 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:37.114 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"opKa5r41fs73XPLS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14093/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14093/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:37.114 [print] {
"resourceType": "Patient",
"id": "14093",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:41.760+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSARIO <b>RUBIO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98049</td></tr><tr><td>Date of birth</td><td><span>09 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NAVARRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98049"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSARIO RUBIO NAVARRO",
"family": "RUBIO",
"given": [
"ROSARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "garrett.bergstrom@barrows.com"
},
{
"system": "phone",
"value": "34 (272) 856-7643"
}
],
"gender": "female",
"birthDate": "2013-10-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:37.114 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:37.735 [print] {
"resourceType": "Patient",
"id": "14093",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:41.760+02:00",
"source": "#opKa5r41fs73XPLS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ROSARIO <b>RUBIO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98049</td></tr><tr><td>Date of birth</td><td><span>09 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "NAVARRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98049"
}
],
"name": [
{
"use": "anonymous",
"text": "ROSARIO RUBIO NAVARRO",
"family": "RUBIO",
"given": [
"ROSARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "garrett.bergstrom@barrows.com"
},
{
"system": "phone",
"value": "34 (272) 856-7643"
}
],
"gender": "female",
"birthDate": "2013-10-09",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:38.343 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:38.910 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:42.999+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:42.999+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:38.910 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "185310"
}
],
"name": [
{
"use": "anonymous",
"text": "CELIA SOTO CANO",
"family": "SOTO",
"given": [
"CELIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "krowe@hotmail.com"
},
{
"system": "phone",
"value": "34 (436) 224-3016"
}
],
"gender": "female",
"birthDate": "2013-11-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:39.574 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:39.574 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BHRp4SdiP2Atuj7E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14094/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14094/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:39.574 [print] {
"resourceType": "Patient",
"id": "14094",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:44.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CELIA <b>SOTO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>185310</td></tr><tr><td>Date of birth</td><td><span>29 November 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "185310"
}
],
"name": [
{
"use": "anonymous",
"text": "CELIA SOTO CANO",
"family": "SOTO",
"given": [
"CELIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "krowe@hotmail.com"
},
{
"system": "phone",
"value": "34 (436) 224-3016"
}
],
"gender": "female",
"birthDate": "2013-11-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:39.574 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:39.574 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:39.574 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BHRp4SdiP2Atuj7E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14094/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14094/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:39.574 [print] {
"resourceType": "Patient",
"id": "14094",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:44.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CELIA <b>SOTO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>185310</td></tr><tr><td>Date of birth</td><td><span>29 November 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "185310"
}
],
"name": [
{
"use": "anonymous",
"text": "CELIA SOTO CANO",
"family": "SOTO",
"given": [
"CELIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "krowe@hotmail.com"
},
{
"system": "phone",
"value": "34 (436) 224-3016"
}
],
"gender": "female",
"birthDate": "2013-11-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:39.574 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:40.202 [print] {
"resourceType": "Patient",
"id": "14094",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:44.227+02:00",
"source": "#BHRp4SdiP2Atuj7E",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CELIA <b>SOTO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>185310</td></tr><tr><td>Date of birth</td><td><span>29 November 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CANO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "185310"
}
],
"name": [
{
"use": "anonymous",
"text": "CELIA SOTO CANO",
"family": "SOTO",
"given": [
"CELIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "krowe@hotmail.com"
},
{
"system": "phone",
"value": "34 (436) 224-3016"
}
],
"gender": "female",
"birthDate": "2013-11-29",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:40.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:41.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:45.499+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:45.499+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:41.439 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CALVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "179327"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA NIEVES ROMAN CALVO",
"family": "ROMAN",
"given": [
"MARIA NIEVES"
]
}
],
"telecom": [
{
"system": "email",
"value": "wreynolds@yahoo.com"
},
{
"system": "phone",
"value": "34 (845) 726-4313"
}
],
"gender": "female",
"birthDate": "2014-01-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:42.267 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:42.267 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gy9JuKrCikSs7gfA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14095/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14095/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:42.267 [print] {
"resourceType": "Patient",
"id": "14095",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:46.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA NIEVES <b>ROMAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>179327</td></tr><tr><td>Date of birth</td><td><span>07 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CALVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "179327"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA NIEVES ROMAN CALVO",
"family": "ROMAN",
"given": [
"MARIA NIEVES"
]
}
],
"telecom": [
{
"system": "email",
"value": "wreynolds@yahoo.com"
},
{
"system": "phone",
"value": "34 (845) 726-4313"
}
],
"gender": "female",
"birthDate": "2014-01-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:42.267 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:42.267 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:42.267 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gy9JuKrCikSs7gfA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14095/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14095/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:42.267 [print] {
"resourceType": "Patient",
"id": "14095",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:46.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA NIEVES <b>ROMAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>179327</td></tr><tr><td>Date of birth</td><td><span>07 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CALVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "179327"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA NIEVES ROMAN CALVO",
"family": "ROMAN",
"given": [
"MARIA NIEVES"
]
}
],
"telecom": [
{
"system": "email",
"value": "wreynolds@yahoo.com"
},
{
"system": "phone",
"value": "34 (845) 726-4313"
}
],
"gender": "female",
"birthDate": "2014-01-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:42.267 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:43.165 [print] {
"resourceType": "Patient",
"id": "14095",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:46.932+02:00",
"source": "#gy9JuKrCikSs7gfA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA NIEVES <b>ROMAN </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>179327</td></tr><tr><td>Date of birth</td><td><span>07 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CALVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "179327"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA NIEVES ROMAN CALVO",
"family": "ROMAN",
"given": [
"MARIA NIEVES"
]
}
],
"telecom": [
{
"system": "email",
"value": "wreynolds@yahoo.com"
},
{
"system": "phone",
"value": "34 (845) 726-4313"
}
],
"gender": "female",
"birthDate": "2014-01-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:43.970 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:44.574 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:48.651+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:48.651+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:44.589 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "183994"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGELES MONTERO FERNANDEZ",
"family": "MONTERO",
"given": [
"ANGELES"
]
}
],
"telecom": [
{
"system": "email",
"value": "kmohr@tillman.info"
},
{
"system": "phone",
"value": "34 (376) 392-2565"
}
],
"gender": "female",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:45.223 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"776"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:45.223 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"s3cdSkixHER8Mr1N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14096/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14096/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:45.223 [print] {
"resourceType": "Patient",
"id": "14096",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:49.864+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGELES <b>MONTERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>183994</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "183994"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGELES MONTERO FERNANDEZ",
"family": "MONTERO",
"given": [
"ANGELES"
]
}
],
"telecom": [
{
"system": "email",
"value": "kmohr@tillman.info"
},
{
"system": "phone",
"value": "34 (376) 392-2565"
}
],
"gender": "female",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:45.223 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:45.225 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"776"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:45.225 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"s3cdSkixHER8Mr1N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14096/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14096/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:45.225 [print] {
"resourceType": "Patient",
"id": "14096",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:49.864+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGELES <b>MONTERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>183994</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "183994"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGELES MONTERO FERNANDEZ",
"family": "MONTERO",
"given": [
"ANGELES"
]
}
],
"telecom": [
{
"system": "email",
"value": "kmohr@tillman.info"
},
{
"system": "phone",
"value": "34 (376) 392-2565"
}
],
"gender": "female",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:45.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:45.797 [print] {
"resourceType": "Patient",
"id": "14096",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:49.864+02:00",
"source": "#s3cdSkixHER8Mr1N",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANGELES <b>MONTERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>183994</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "183994"
}
],
"name": [
{
"use": "anonymous",
"text": "ANGELES MONTERO FERNANDEZ",
"family": "MONTERO",
"given": [
"ANGELES"
]
}
],
"telecom": [
{
"system": "email",
"value": "kmohr@tillman.info"
},
{
"system": "phone",
"value": "34 (376) 392-2565"
}
],
"gender": "female",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:46.442 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:47.056 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:51.118+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:51.118+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:47.057 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUTIERREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164472"
}
],
"name": [
{
"use": "anonymous",
"text": "GONZALO REYES GUTIERREZ",
"family": "REYES",
"given": [
"GONZALO"
]
}
],
"telecom": [
{
"system": "email",
"value": "joshuah85@yahoo.com"
},
{
"system": "phone",
"value": "34 (233) 378-8443"
}
],
"gender": "male",
"birthDate": "2014-04-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:47.653 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:47.653 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IVZy0gd9v1EcUg66"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14097/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14097/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:47.653 [print] {
"resourceType": "Patient",
"id": "14097",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:52.314+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GONZALO <b>REYES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164472</td></tr><tr><td>Date of birth</td><td><span>10 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUTIERREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164472"
}
],
"name": [
{
"use": "anonymous",
"text": "GONZALO REYES GUTIERREZ",
"family": "REYES",
"given": [
"GONZALO"
]
}
],
"telecom": [
{
"system": "email",
"value": "joshuah85@yahoo.com"
},
{
"system": "phone",
"value": "34 (233) 378-8443"
}
],
"gender": "male",
"birthDate": "2014-04-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:47.653 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:47.653 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"796"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:47.653 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IVZy0gd9v1EcUg66"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14097/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14097/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:47.653 [print] {
"resourceType": "Patient",
"id": "14097",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:52.314+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GONZALO <b>REYES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164472</td></tr><tr><td>Date of birth</td><td><span>10 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUTIERREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164472"
}
],
"name": [
{
"use": "anonymous",
"text": "GONZALO REYES GUTIERREZ",
"family": "REYES",
"given": [
"GONZALO"
]
}
],
"telecom": [
{
"system": "email",
"value": "joshuah85@yahoo.com"
},
{
"system": "phone",
"value": "34 (233) 378-8443"
}
],
"gender": "male",
"birthDate": "2014-04-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:47.653 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:48.255 [print] {
"resourceType": "Patient",
"id": "14097",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:52.314+02:00",
"source": "#IVZy0gd9v1EcUg66",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GONZALO <b>REYES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>164472</td></tr><tr><td>Date of birth</td><td><span>10 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUTIERREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "164472"
}
],
"name": [
{
"use": "anonymous",
"text": "GONZALO REYES GUTIERREZ",
"family": "REYES",
"given": [
"GONZALO"
]
}
],
"telecom": [
{
"system": "email",
"value": "joshuah85@yahoo.com"
},
{
"system": "phone",
"value": "34 (233) 378-8443"
}
],
"gender": "male",
"birthDate": "2014-04-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:48.859 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:49.446 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:53.535+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:53.535+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:49.447 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157885"
}
],
"name": [
{
"use": "anonymous",
"text": "CARLOS HERNANDEZ SANZ",
"family": "HERNANDEZ",
"given": [
"CARLOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "haylee11@pfannerstill.com"
},
{
"system": "phone",
"value": "34 (995) 721-3802"
}
],
"gender": "male",
"birthDate": "2014-05-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:50.063 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:50.063 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bg857t2DLjNJdXju"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14098/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14098/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:50.063 [print] {
"resourceType": "Patient",
"id": "14098",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:54.718+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARLOS <b>HERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157885</td></tr><tr><td>Date of birth</td><td><span>08 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157885"
}
],
"name": [
{
"use": "anonymous",
"text": "CARLOS HERNANDEZ SANZ",
"family": "HERNANDEZ",
"given": [
"CARLOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "haylee11@pfannerstill.com"
},
{
"system": "phone",
"value": "34 (995) 721-3802"
}
],
"gender": "male",
"birthDate": "2014-05-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:50.063 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:50.065 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:50.065 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bg857t2DLjNJdXju"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14098/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:42:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14098/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:42:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:50.065 [print] {
"resourceType": "Patient",
"id": "14098",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:54.718+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARLOS <b>HERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157885</td></tr><tr><td>Date of birth</td><td><span>08 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157885"
}
],
"name": [
{
"use": "anonymous",
"text": "CARLOS HERNANDEZ SANZ",
"family": "HERNANDEZ",
"given": [
"CARLOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "haylee11@pfannerstill.com"
},
{
"system": "phone",
"value": "34 (995) 721-3802"
}
],
"gender": "male",
"birthDate": "2014-05-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:50.065 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:53.640 [print] {
"resourceType": "Patient",
"id": "14098",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:42:54.718+02:00",
"source": "#bg857t2DLjNJdXju",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CARLOS <b>HERNANDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157885</td></tr><tr><td>Date of birth</td><td><span>08 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157885"
}
],
"name": [
{
"use": "anonymous",
"text": "CARLOS HERNANDEZ SANZ",
"family": "HERNANDEZ",
"given": [
"CARLOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "haylee11@pfannerstill.com"
},
{
"system": "phone",
"value": "34 (995) 721-3802"
}
],
"gender": "male",
"birthDate": "2014-05-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:54.204 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:54.823 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:42:58.884+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:42:58.884+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:54.823 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOYA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157719"
}
],
"name": [
{
"use": "anonymous",
"text": "ANDRES SANZ MOYA",
"family": "SANZ",
"given": [
"ANDRES"
]
}
],
"telecom": [
{
"system": "email",
"value": "abbott.hosea@oreilly.com"
},
{
"system": "phone",
"value": "34 (271) 839-1743"
}
],
"gender": "male",
"birthDate": "2014-07-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:55.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:55.410 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AtdfPRX7KXglQRNB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14099/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14099/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:55.410 [print] {
"resourceType": "Patient",
"id": "14099",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:00.070+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANDRES <b>SANZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157719</td></tr><tr><td>Date of birth</td><td><span>15 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOYA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157719"
}
],
"name": [
{
"use": "anonymous",
"text": "ANDRES SANZ MOYA",
"family": "SANZ",
"given": [
"ANDRES"
]
}
],
"telecom": [
{
"system": "email",
"value": "abbott.hosea@oreilly.com"
},
{
"system": "phone",
"value": "34 (271) 839-1743"
}
],
"gender": "male",
"birthDate": "2014-07-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:55.410 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:55.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:55.410 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AtdfPRX7KXglQRNB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14099/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14099/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:55.410 [print] {
"resourceType": "Patient",
"id": "14099",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:00.070+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANDRES <b>SANZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157719</td></tr><tr><td>Date of birth</td><td><span>15 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOYA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157719"
}
],
"name": [
{
"use": "anonymous",
"text": "ANDRES SANZ MOYA",
"family": "SANZ",
"given": [
"ANDRES"
]
}
],
"telecom": [
{
"system": "email",
"value": "abbott.hosea@oreilly.com"
},
{
"system": "phone",
"value": "34 (271) 839-1743"
}
],
"gender": "male",
"birthDate": "2014-07-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:55.410 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:56.026 [print] {
"resourceType": "Patient",
"id": "14099",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:00.070+02:00",
"source": "#AtdfPRX7KXglQRNB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ANDRES <b>SANZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157719</td></tr><tr><td>Date of birth</td><td><span>15 July 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MOYA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157719"
}
],
"name": [
{
"use": "anonymous",
"text": "ANDRES SANZ MOYA",
"family": "SANZ",
"given": [
"ANDRES"
]
}
],
"telecom": [
{
"system": "email",
"value": "abbott.hosea@oreilly.com"
},
{
"system": "phone",
"value": "34 (271) 839-1743"
}
],
"gender": "male",
"birthDate": "2014-07-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:56.642 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:57.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:01.320+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:01.320+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:57.260 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IGLESIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54683"
}
],
"name": [
{
"use": "anonymous",
"text": "MARGARITA MARQUEZ IGLESIAS",
"family": "MARQUEZ",
"given": [
"MARGARITA"
]
}
],
"telecom": [
{
"system": "email",
"value": "keshaun.lowe@hills.com"
},
{
"system": "phone",
"value": "34 (255) 952-7056"
}
],
"gender": "female",
"birthDate": "2014-09-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:57.890 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:57.890 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mBUbVUboNBoX69IC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14100/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14100/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:57.890 [print] {
"resourceType": "Patient",
"id": "14100",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:02.550+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARGARITA <b>MARQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54683</td></tr><tr><td>Date of birth</td><td><span>05 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IGLESIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54683"
}
],
"name": [
{
"use": "anonymous",
"text": "MARGARITA MARQUEZ IGLESIAS",
"family": "MARQUEZ",
"given": [
"MARGARITA"
]
}
],
"telecom": [
{
"system": "email",
"value": "keshaun.lowe@hills.com"
},
{
"system": "phone",
"value": "34 (255) 952-7056"
}
],
"gender": "female",
"birthDate": "2014-09-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:57.890 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:42:57.890 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:42:57.890 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mBUbVUboNBoX69IC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14100/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14100/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:42:57.890 [print] {
"resourceType": "Patient",
"id": "14100",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:02.550+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARGARITA <b>MARQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54683</td></tr><tr><td>Date of birth</td><td><span>05 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IGLESIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54683"
}
],
"name": [
{
"use": "anonymous",
"text": "MARGARITA MARQUEZ IGLESIAS",
"family": "MARQUEZ",
"given": [
"MARGARITA"
]
}
],
"telecom": [
{
"system": "email",
"value": "keshaun.lowe@hills.com"
},
{
"system": "phone",
"value": "34 (255) 952-7056"
}
],
"gender": "female",
"birthDate": "2014-09-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:42:57.890 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:42:58.507 [print] {
"resourceType": "Patient",
"id": "14100",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:02.550+02:00",
"source": "#mBUbVUboNBoX69IC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARGARITA <b>MARQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>54683</td></tr><tr><td>Date of birth</td><td><span>05 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "IGLESIAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "54683"
}
],
"name": [
{
"use": "anonymous",
"text": "MARGARITA MARQUEZ IGLESIAS",
"family": "MARQUEZ",
"given": [
"MARGARITA"
]
}
],
"telecom": [
{
"system": "email",
"value": "keshaun.lowe@hills.com"
},
{
"system": "phone",
"value": "34 (255) 952-7056"
}
],
"gender": "female",
"birthDate": "2014-09-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:42:59.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:42:59.698 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:03.798+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:03.798+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:42:59.698 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEÑA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "117009"
}
],
"name": [
{
"use": "anonymous",
"text": "ADRIAN MOLINA PEÑA",
"family": "MOLINA",
"given": [
"ADRIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "sporer.gerald@gleichner.info"
}
],
"gender": "male",
"birthDate": "2014-11-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:00.348 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"750"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:00.349 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pDG76FcRixv62I6z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14101/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14101/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:00.349 [print] {
"resourceType": "Patient",
"id": "14101",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:05.002+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ADRIAN <b>MOLINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>117009</td></tr><tr><td>Date of birth</td><td><span>12 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEÑA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "117009"
}
],
"name": [
{
"use": "anonymous",
"text": "ADRIAN MOLINA PEÑA",
"family": "MOLINA",
"given": [
"ADRIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "sporer.gerald@gleichner.info"
}
],
"gender": "male",
"birthDate": "2014-11-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:00.349 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:00.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"750"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:00.351 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pDG76FcRixv62I6z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14101/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14101/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:00.351 [print] {
"resourceType": "Patient",
"id": "14101",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:05.002+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ADRIAN <b>MOLINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>117009</td></tr><tr><td>Date of birth</td><td><span>12 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEÑA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "117009"
}
],
"name": [
{
"use": "anonymous",
"text": "ADRIAN MOLINA PEÑA",
"family": "MOLINA",
"given": [
"ADRIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "sporer.gerald@gleichner.info"
}
],
"gender": "male",
"birthDate": "2014-11-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:00.351 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:00.908 [print] {
"resourceType": "Patient",
"id": "14101",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:05.002+02:00",
"source": "#pDG76FcRixv62I6z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ADRIAN <b>MOLINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>117009</td></tr><tr><td>Date of birth</td><td><span>12 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEÑA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "117009"
}
],
"name": [
{
"use": "anonymous",
"text": "ADRIAN MOLINA PEÑA",
"family": "MOLINA",
"given": [
"ADRIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "sporer.gerald@gleichner.info"
}
],
"gender": "male",
"birthDate": "2014-11-12",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:01.586 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:02.154 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:06.244+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:06.244+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:02.154 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTANA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "192785"
}
],
"name": [
{
"use": "anonymous",
"text": "MIGUEL MORENO SANTANA",
"family": "MORENO",
"given": [
"MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "coby.fadel@wyman.com"
}
],
"gender": "male",
"birthDate": "2014-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:02.789 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"746"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:02.789 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iibklsTEzekh4LYE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14102/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14102/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:02.789 [print] {
"resourceType": "Patient",
"id": "14102",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:07.443+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIGUEL <b>MORENO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>192785</td></tr><tr><td>Date of birth</td><td><span>05 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTANA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "192785"
}
],
"name": [
{
"use": "anonymous",
"text": "MIGUEL MORENO SANTANA",
"family": "MORENO",
"given": [
"MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "coby.fadel@wyman.com"
}
],
"gender": "male",
"birthDate": "2014-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:02.789 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:02.792 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"746"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:02.792 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iibklsTEzekh4LYE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14102/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14102/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:02.792 [print] {
"resourceType": "Patient",
"id": "14102",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:07.443+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIGUEL <b>MORENO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>192785</td></tr><tr><td>Date of birth</td><td><span>05 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTANA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "192785"
}
],
"name": [
{
"use": "anonymous",
"text": "MIGUEL MORENO SANTANA",
"family": "MORENO",
"given": [
"MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "coby.fadel@wyman.com"
}
],
"gender": "male",
"birthDate": "2014-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:02.792 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:03.359 [print] {
"resourceType": "Patient",
"id": "14102",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:07.443+02:00",
"source": "#iibklsTEzekh4LYE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MIGUEL <b>MORENO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>192785</td></tr><tr><td>Date of birth</td><td><span>05 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SANTANA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "192785"
}
],
"name": [
{
"use": "anonymous",
"text": "MIGUEL MORENO SANTANA",
"family": "MORENO",
"given": [
"MIGUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "coby.fadel@wyman.com"
}
],
"gender": "male",
"birthDate": "2014-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:03.958 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:04.684 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:08.639+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:08.639+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:04.685 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORENO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "25836"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN MANUEL MEDINA MORENO",
"family": "MEDINA",
"given": [
"JUAN MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "talia.russel@gmail.com"
},
{
"system": "phone",
"value": "34 (283) 752-3553"
}
],
"gender": "male",
"birthDate": "2015-05-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:05.271 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:05.271 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vnZlD6VIrr9y0wSO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14103/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14103/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:05.271 [print] {
"resourceType": "Patient",
"id": "14103",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:09.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN MANUEL <b>MEDINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>25836</td></tr><tr><td>Date of birth</td><td><span>13 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORENO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "25836"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN MANUEL MEDINA MORENO",
"family": "MEDINA",
"given": [
"JUAN MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "talia.russel@gmail.com"
},
{
"system": "phone",
"value": "34 (283) 752-3553"
}
],
"gender": "male",
"birthDate": "2015-05-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:05.271 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:05.271 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:05.271 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vnZlD6VIrr9y0wSO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14103/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14103/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:05.271 [print] {
"resourceType": "Patient",
"id": "14103",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:09.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN MANUEL <b>MEDINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>25836</td></tr><tr><td>Date of birth</td><td><span>13 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORENO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "25836"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN MANUEL MEDINA MORENO",
"family": "MEDINA",
"given": [
"JUAN MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "talia.russel@gmail.com"
},
{
"system": "phone",
"value": "34 (283) 752-3553"
}
],
"gender": "male",
"birthDate": "2015-05-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:05.271 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:05.887 [print] {
"resourceType": "Patient",
"id": "14103",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:09.933+02:00",
"source": "#vnZlD6VIrr9y0wSO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN MANUEL <b>MEDINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>25836</td></tr><tr><td>Date of birth</td><td><span>13 May 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MORENO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "25836"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN MANUEL MEDINA MORENO",
"family": "MEDINA",
"given": [
"JUAN MANUEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "talia.russel@gmail.com"
},
{
"system": "phone",
"value": "34 (283) 752-3553"
}
],
"gender": "male",
"birthDate": "2015-05-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:06.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:07.105 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:11.171+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:11.171+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:07.107 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "27286"
}
],
"name": [
{
"use": "anonymous",
"text": "SANDRA CANO MARTIN",
"family": "CANO",
"given": [
"SANDRA"
]
}
],
"telecom": [
{
"system": "email",
"value": "eleffler@yahoo.com"
},
{
"system": "phone",
"value": "34 (541) 959-2198"
}
],
"gender": "female",
"birthDate": "2015-07-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:07.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:07.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Szm38Vs012egQqjz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14104/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14104/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:07.741 [print] {
"resourceType": "Patient",
"id": "14104",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:12.397+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SANDRA <b>CANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>27286</td></tr><tr><td>Date of birth</td><td><span>13 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "27286"
}
],
"name": [
{
"use": "anonymous",
"text": "SANDRA CANO MARTIN",
"family": "CANO",
"given": [
"SANDRA"
]
}
],
"telecom": [
{
"system": "email",
"value": "eleffler@yahoo.com"
},
{
"system": "phone",
"value": "34 (541) 959-2198"
}
],
"gender": "female",
"birthDate": "2015-07-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:07.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:07.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"786"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:07.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Szm38Vs012egQqjz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14104/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14104/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:07.741 [print] {
"resourceType": "Patient",
"id": "14104",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:12.397+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SANDRA <b>CANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>27286</td></tr><tr><td>Date of birth</td><td><span>13 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "27286"
}
],
"name": [
{
"use": "anonymous",
"text": "SANDRA CANO MARTIN",
"family": "CANO",
"given": [
"SANDRA"
]
}
],
"telecom": [
{
"system": "email",
"value": "eleffler@yahoo.com"
},
{
"system": "phone",
"value": "34 (541) 959-2198"
}
],
"gender": "female",
"birthDate": "2015-07-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:07.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:08.367 [print] {
"resourceType": "Patient",
"id": "14104",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:12.397+02:00",
"source": "#Szm38Vs012egQqjz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SANDRA <b>CANO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>27286</td></tr><tr><td>Date of birth</td><td><span>13 July 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARTIN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "27286"
}
],
"name": [
{
"use": "anonymous",
"text": "SANDRA CANO MARTIN",
"family": "CANO",
"given": [
"SANDRA"
]
}
],
"telecom": [
{
"system": "email",
"value": "eleffler@yahoo.com"
},
{
"system": "phone",
"value": "34 (541) 959-2198"
}
],
"gender": "female",
"birthDate": "2015-07-13",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:09.204 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:10.788 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:13.878+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:13.878+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:10.788 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RODRIGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "126256"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MARIA DOMINGUEZ RODRIGUEZ",
"family": "DOMINGUEZ",
"given": [
"JOSE MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "raphaelle.mcdermott@gmail.com"
},
{
"system": "phone",
"value": "34 (669) 612-8528"
}
],
"gender": "male",
"birthDate": "2015-08-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:12.457 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"820"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:12.457 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZJ6LGiNHdgDLZsaO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14105/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14105/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:12.457 [print] {
"resourceType": "Patient",
"id": "14105",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:17.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MARIA <b>DOMINGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>126256</td></tr><tr><td>Date of birth</td><td><span>18 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RODRIGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "126256"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MARIA DOMINGUEZ RODRIGUEZ",
"family": "DOMINGUEZ",
"given": [
"JOSE MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "raphaelle.mcdermott@gmail.com"
},
{
"system": "phone",
"value": "34 (669) 612-8528"
}
],
"gender": "male",
"birthDate": "2015-08-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:12.457 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:12.457 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"820"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:12.457 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZJ6LGiNHdgDLZsaO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14105/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14105/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:12.457 [print] {
"resourceType": "Patient",
"id": "14105",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:17.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MARIA <b>DOMINGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>126256</td></tr><tr><td>Date of birth</td><td><span>18 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RODRIGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "126256"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MARIA DOMINGUEZ RODRIGUEZ",
"family": "DOMINGUEZ",
"given": [
"JOSE MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "raphaelle.mcdermott@gmail.com"
},
{
"system": "phone",
"value": "34 (669) 612-8528"
}
],
"gender": "male",
"birthDate": "2015-08-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:12.457 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:13.116 [print] {
"resourceType": "Patient",
"id": "14105",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:17.090+02:00",
"source": "#ZJ6LGiNHdgDLZsaO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE MARIA <b>DOMINGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>126256</td></tr><tr><td>Date of birth</td><td><span>18 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RODRIGUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "126256"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE MARIA DOMINGUEZ RODRIGUEZ",
"family": "DOMINGUEZ",
"given": [
"JOSE MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "raphaelle.mcdermott@gmail.com"
},
{
"system": "phone",
"value": "34 (669) 612-8528"
}
],
"gender": "male",
"birthDate": "2015-08-18",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:13.756 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:14.359 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:18.414+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:18.414+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:14.374 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MONTERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "187595"
}
],
"name": [
{
"use": "anonymous",
"text": "JOAQUIN CORTES MONTERO",
"family": "CORTES",
"given": [
"JOAQUIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "wpagac@hotmail.com"
},
{
"system": "phone",
"value": "34 (345) 580-3861"
}
],
"gender": "male",
"birthDate": "2015-10-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:15.238 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:15.238 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4FOlwLBTl33KSlAx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14106/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14106/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:15.238 [print] {
"resourceType": "Patient",
"id": "14106",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:19.873+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOAQUIN <b>CORTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>187595</td></tr><tr><td>Date of birth</td><td><span>15 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MONTERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "187595"
}
],
"name": [
{
"use": "anonymous",
"text": "JOAQUIN CORTES MONTERO",
"family": "CORTES",
"given": [
"JOAQUIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "wpagac@hotmail.com"
},
{
"system": "phone",
"value": "34 (345) 580-3861"
}
],
"gender": "male",
"birthDate": "2015-10-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:15.238 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:15.240 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:15.240 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4FOlwLBTl33KSlAx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14106/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14106/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:15.240 [print] {
"resourceType": "Patient",
"id": "14106",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:19.873+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOAQUIN <b>CORTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>187595</td></tr><tr><td>Date of birth</td><td><span>15 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MONTERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "187595"
}
],
"name": [
{
"use": "anonymous",
"text": "JOAQUIN CORTES MONTERO",
"family": "CORTES",
"given": [
"JOAQUIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "wpagac@hotmail.com"
},
{
"system": "phone",
"value": "34 (345) 580-3861"
}
],
"gender": "male",
"birthDate": "2015-10-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:15.240 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:16.090 [print] {
"resourceType": "Patient",
"id": "14106",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:19.873+02:00",
"source": "#4FOlwLBTl33KSlAx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOAQUIN <b>CORTES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>187595</td></tr><tr><td>Date of birth</td><td><span>15 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MONTERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "187595"
}
],
"name": [
{
"use": "anonymous",
"text": "JOAQUIN CORTES MONTERO",
"family": "CORTES",
"given": [
"JOAQUIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "wpagac@hotmail.com"
},
{
"system": "phone",
"value": "34 (345) 580-3861"
}
],
"gender": "male",
"birthDate": "2015-10-15",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:16.942 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:17.521 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:21.608+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:21.608+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:17.523 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "165306"
}
],
"name": [
{
"use": "anonymous",
"text": "IVAN ORTEGA ORTIZ",
"family": "ORTEGA",
"given": [
"IVAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "oberbrunner.lillian@yahoo.com"
},
{
"system": "phone",
"value": "34 (318) 758-9741"
}
],
"gender": "male",
"birthDate": "2015-10-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:18.112 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"794"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:18.112 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ub7NHhHufGDbECD1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14107/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14107/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:18.112 [print] {
"resourceType": "Patient",
"id": "14107",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:22.762+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IVAN <b>ORTEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>165306</td></tr><tr><td>Date of birth</td><td><span>16 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "165306"
}
],
"name": [
{
"use": "anonymous",
"text": "IVAN ORTEGA ORTIZ",
"family": "ORTEGA",
"given": [
"IVAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "oberbrunner.lillian@yahoo.com"
},
{
"system": "phone",
"value": "34 (318) 758-9741"
}
],
"gender": "male",
"birthDate": "2015-10-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:18.112 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:18.115 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"794"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:18.115 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ub7NHhHufGDbECD1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14107/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14107/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:18.115 [print] {
"resourceType": "Patient",
"id": "14107",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:22.762+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IVAN <b>ORTEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>165306</td></tr><tr><td>Date of birth</td><td><span>16 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "165306"
}
],
"name": [
{
"use": "anonymous",
"text": "IVAN ORTEGA ORTIZ",
"family": "ORTEGA",
"given": [
"IVAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "oberbrunner.lillian@yahoo.com"
},
{
"system": "phone",
"value": "34 (318) 758-9741"
}
],
"gender": "male",
"birthDate": "2015-10-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:18.115 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:18.754 [print] {
"resourceType": "Patient",
"id": "14107",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:22.762+02:00",
"source": "#ub7NHhHufGDbECD1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">IVAN <b>ORTEGA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>165306</td></tr><tr><td>Date of birth</td><td><span>16 October 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTIZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "165306"
}
],
"name": [
{
"use": "anonymous",
"text": "IVAN ORTEGA ORTIZ",
"family": "ORTEGA",
"given": [
"IVAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "oberbrunner.lillian@yahoo.com"
},
{
"system": "phone",
"value": "34 (318) 758-9741"
}
],
"gender": "male",
"birthDate": "2015-10-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:29.289 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:29.919 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:33.962+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:33.962+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:29.921 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUBIO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "41396"
}
],
"name": [
{
"use": "anonymous",
"text": "PABLO GUTIERREZ RUBIO",
"family": "GUTIERREZ",
"given": [
"PABLO"
]
}
],
"telecom": [
{
"system": "email",
"value": "mcdermott.hollis@gmail.com"
},
{
"system": "phone",
"value": "34 (324) 489-5513"
}
],
"gender": "male",
"birthDate": "2015-12-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:30.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:30.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jJDMUwakOBCt2fXU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14108/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14108/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:30.547 [print] {
"resourceType": "Patient",
"id": "14108",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:35.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PABLO <b>GUTIERREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>41396</td></tr><tr><td>Date of birth</td><td><span>07 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUBIO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "41396"
}
],
"name": [
{
"use": "anonymous",
"text": "PABLO GUTIERREZ RUBIO",
"family": "GUTIERREZ",
"given": [
"PABLO"
]
}
],
"telecom": [
{
"system": "email",
"value": "mcdermott.hollis@gmail.com"
},
{
"system": "phone",
"value": "34 (324) 489-5513"
}
],
"gender": "male",
"birthDate": "2015-12-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:30.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:30.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"798"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:30.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jJDMUwakOBCt2fXU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14108/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14108/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:30.549 [print] {
"resourceType": "Patient",
"id": "14108",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:35.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PABLO <b>GUTIERREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>41396</td></tr><tr><td>Date of birth</td><td><span>07 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUBIO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "41396"
}
],
"name": [
{
"use": "anonymous",
"text": "PABLO GUTIERREZ RUBIO",
"family": "GUTIERREZ",
"given": [
"PABLO"
]
}
],
"telecom": [
{
"system": "email",
"value": "mcdermott.hollis@gmail.com"
},
{
"system": "phone",
"value": "34 (324) 489-5513"
}
],
"gender": "male",
"birthDate": "2015-12-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:30.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:31.152 [print] {
"resourceType": "Patient",
"id": "14108",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:35.189+02:00",
"source": "#jJDMUwakOBCt2fXU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PABLO <b>GUTIERREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>41396</td></tr><tr><td>Date of birth</td><td><span>07 December 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "RUBIO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "41396"
}
],
"name": [
{
"use": "anonymous",
"text": "PABLO GUTIERREZ RUBIO",
"family": "GUTIERREZ",
"given": [
"PABLO"
]
}
],
"telecom": [
{
"system": "email",
"value": "mcdermott.hollis@gmail.com"
},
{
"system": "phone",
"value": "34 (324) 489-5513"
}
],
"gender": "male",
"birthDate": "2015-12-07",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:32.223 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:32.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:36.889+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:36.889+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:32.856 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLEGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "72674"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE RAMON SANTANA GALLEGO",
"family": "SANTANA",
"given": [
"JOSE RAMON"
]
}
],
"telecom": [
{
"system": "email",
"value": "valentina38@yahoo.com"
},
{
"system": "phone",
"value": "34 (882) 683-6794"
}
],
"gender": "male",
"birthDate": "2016-02-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:34.482 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:34.482 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IwKyfANHRktrfLUY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14109/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14109/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:34.482 [print] {
"resourceType": "Patient",
"id": "14109",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:39.126+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE RAMON <b>SANTANA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>72674</td></tr><tr><td>Date of birth</td><td><span>17 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLEGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "72674"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE RAMON SANTANA GALLEGO",
"family": "SANTANA",
"given": [
"JOSE RAMON"
]
}
],
"telecom": [
{
"system": "email",
"value": "valentina38@yahoo.com"
},
{
"system": "phone",
"value": "34 (882) 683-6794"
}
],
"gender": "male",
"birthDate": "2016-02-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:34.482 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:34.482 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"803"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:34.482 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IwKyfANHRktrfLUY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14109/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14109/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:34.482 [print] {
"resourceType": "Patient",
"id": "14109",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:39.126+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE RAMON <b>SANTANA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>72674</td></tr><tr><td>Date of birth</td><td><span>17 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLEGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "72674"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE RAMON SANTANA GALLEGO",
"family": "SANTANA",
"given": [
"JOSE RAMON"
]
}
],
"telecom": [
{
"system": "email",
"value": "valentina38@yahoo.com"
},
{
"system": "phone",
"value": "34 (882) 683-6794"
}
],
"gender": "male",
"birthDate": "2016-02-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:34.482 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:35.121 [print] {
"resourceType": "Patient",
"id": "14109",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:39.126+02:00",
"source": "#IwKyfANHRktrfLUY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE RAMON <b>SANTANA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>72674</td></tr><tr><td>Date of birth</td><td><span>17 February 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GALLEGO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "72674"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE RAMON SANTANA GALLEGO",
"family": "SANTANA",
"given": [
"JOSE RAMON"
]
}
],
"telecom": [
{
"system": "email",
"value": "valentina38@yahoo.com"
},
{
"system": "phone",
"value": "34 (882) 683-6794"
}
],
"gender": "male",
"birthDate": "2016-02-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:35.707 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:37.591 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:40.376+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:40.376+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:37.591 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEÑA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "172946"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JESUS MOLINA PEÑA",
"family": "MOLINA",
"given": [
"MARIA JESUS"
]
}
],
"telecom": [
{
"system": "email",
"value": "gaetano77@grimes.com"
},
{
"system": "phone",
"value": "34 (629) 525-7819"
}
],
"gender": "female",
"birthDate": "2016-03-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:38.182 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:38.182 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C1IY5qXi8Fd80lN8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14110/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14110/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:38.182 [print] {
"resourceType": "Patient",
"id": "14110",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:42.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JESUS <b>MOLINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>172946</td></tr><tr><td>Date of birth</td><td><span>16 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEÑA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "172946"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JESUS MOLINA PEÑA",
"family": "MOLINA",
"given": [
"MARIA JESUS"
]
}
],
"telecom": [
{
"system": "email",
"value": "gaetano77@grimes.com"
},
{
"system": "phone",
"value": "34 (629) 525-7819"
}
],
"gender": "female",
"birthDate": "2016-03-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:38.182 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:38.182 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:38.182 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C1IY5qXi8Fd80lN8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14110/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14110/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:38.182 [print] {
"resourceType": "Patient",
"id": "14110",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:42.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JESUS <b>MOLINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>172946</td></tr><tr><td>Date of birth</td><td><span>16 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEÑA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "172946"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JESUS MOLINA PEÑA",
"family": "MOLINA",
"given": [
"MARIA JESUS"
]
}
],
"telecom": [
{
"system": "email",
"value": "gaetano77@grimes.com"
},
{
"system": "phone",
"value": "34 (629) 525-7819"
}
],
"gender": "female",
"birthDate": "2016-03-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:38.182 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:39.018 [print] {
"resourceType": "Patient",
"id": "14110",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:42.840+02:00",
"source": "#C1IY5qXi8Fd80lN8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA JESUS <b>MOLINA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>172946</td></tr><tr><td>Date of birth</td><td><span>16 March 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEÑA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "172946"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA JESUS MOLINA PEÑA",
"family": "MOLINA",
"given": [
"MARIA JESUS"
]
}
],
"telecom": [
{
"system": "email",
"value": "gaetano77@grimes.com"
},
{
"system": "phone",
"value": "34 (629) 525-7819"
}
],
"gender": "female",
"birthDate": "2016-03-16",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:39.643 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:40.274 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:44.322+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:44.322+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:40.290 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "213033"
}
],
"name": [
{
"use": "anonymous",
"text": "GABRIEL CALVO HERRERO",
"family": "CALVO",
"given": [
"GABRIEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "vmarquardt@yahoo.com"
},
{
"system": "phone",
"value": "34 (331) 784-5958"
}
],
"gender": "male",
"birthDate": "2016-07-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:52.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:52.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o6nzjfKzagnFvkeq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14111/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14111/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:52.808 [print] {
"resourceType": "Patient",
"id": "14111",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:57.467+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GABRIEL <b>CALVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>213033</td></tr><tr><td>Date of birth</td><td><span>05 July 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "213033"
}
],
"name": [
{
"use": "anonymous",
"text": "GABRIEL CALVO HERRERO",
"family": "CALVO",
"given": [
"GABRIEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "vmarquardt@yahoo.com"
},
{
"system": "phone",
"value": "34 (331) 784-5958"
}
],
"gender": "male",
"birthDate": "2016-07-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:52.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:52.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:52.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o6nzjfKzagnFvkeq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14111/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14111/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:52.808 [print] {
"resourceType": "Patient",
"id": "14111",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:57.467+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GABRIEL <b>CALVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>213033</td></tr><tr><td>Date of birth</td><td><span>05 July 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "213033"
}
],
"name": [
{
"use": "anonymous",
"text": "GABRIEL CALVO HERRERO",
"family": "CALVO",
"given": [
"GABRIEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "vmarquardt@yahoo.com"
},
{
"system": "phone",
"value": "34 (331) 784-5958"
}
],
"gender": "male",
"birthDate": "2016-07-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:52.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:53.400 [print] {
"resourceType": "Patient",
"id": "14111",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:57.467+02:00",
"source": "#o6nzjfKzagnFvkeq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">GABRIEL <b>CALVO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>213033</td></tr><tr><td>Date of birth</td><td><span>05 July 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "HERRERO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "213033"
}
],
"name": [
{
"use": "anonymous",
"text": "GABRIEL CALVO HERRERO",
"family": "CALVO",
"given": [
"GABRIEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "vmarquardt@yahoo.com"
},
{
"system": "phone",
"value": "34 (331) 784-5958"
}
],
"gender": "male",
"birthDate": "2016-07-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:54.040 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:54.641 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:43:58.713+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:43:58.713+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:54.641 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "26135"
}
],
"name": [
{
"use": "anonymous",
"text": "SONIA MENDEZ MARQUEZ",
"family": "MENDEZ",
"given": [
"SONIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kadin.gaylord@hotmail.com"
},
{
"system": "phone",
"value": "34 (416) 774-0277"
}
],
"gender": "female",
"birthDate": "2016-12-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:55.257 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:55.257 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rziuq2x00KlGEENv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14112/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14112/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:55.257 [print] {
"resourceType": "Patient",
"id": "14112",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:59.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SONIA <b>MENDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>26135</td></tr><tr><td>Date of birth</td><td><span>06 December 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "26135"
}
],
"name": [
{
"use": "anonymous",
"text": "SONIA MENDEZ MARQUEZ",
"family": "MENDEZ",
"given": [
"SONIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kadin.gaylord@hotmail.com"
},
{
"system": "phone",
"value": "34 (416) 774-0277"
}
],
"gender": "female",
"birthDate": "2016-12-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:55.257 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:55.259 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:55.259 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rziuq2x00KlGEENv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14112/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:43:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14112/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:43:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:55.260 [print] {
"resourceType": "Patient",
"id": "14112",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:59.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SONIA <b>MENDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>26135</td></tr><tr><td>Date of birth</td><td><span>06 December 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "26135"
}
],
"name": [
{
"use": "anonymous",
"text": "SONIA MENDEZ MARQUEZ",
"family": "MENDEZ",
"given": [
"SONIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kadin.gaylord@hotmail.com"
},
{
"system": "phone",
"value": "34 (416) 774-0277"
}
],
"gender": "female",
"birthDate": "2016-12-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:55.260 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:55.874 [print] {
"resourceType": "Patient",
"id": "14112",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:43:59.907+02:00",
"source": "#rziuq2x00KlGEENv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SONIA <b>MENDEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>26135</td></tr><tr><td>Date of birth</td><td><span>06 December 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "MARQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "26135"
}
],
"name": [
{
"use": "anonymous",
"text": "SONIA MENDEZ MARQUEZ",
"family": "MENDEZ",
"given": [
"SONIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kadin.gaylord@hotmail.com"
},
{
"system": "phone",
"value": "34 (416) 774-0277"
}
],
"gender": "female",
"birthDate": "2016-12-06",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:56.490 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:57.114 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:01.168+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:01.168+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:57.114 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "119337"
}
],
"name": [
{
"use": "anonymous",
"text": "DANIEL GOMEZ ",
"family": "GOMEZ",
"given": [
"DANIEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "maude84@gmail.com"
},
{
"system": "phone",
"value": "34 (962) 355-8068"
}
],
"gender": "male",
"birthDate": "2013-04-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:57.743 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"662"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:57.743 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9tjTGONJHhWxtcWz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14113/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14113/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:57.743 [print] {
"resourceType": "Patient",
"id": "14113",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:02.396+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DANIEL <b>GOMEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>119337</td></tr><tr><td>Date of birth</td><td><span>02 April 2013</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "119337"
}
],
"name": [
{
"use": "anonymous",
"text": "DANIEL GOMEZ ",
"family": "GOMEZ",
"given": [
"DANIEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "maude84@gmail.com"
},
{
"system": "phone",
"value": "34 (962) 355-8068"
}
],
"gender": "male",
"birthDate": "2013-04-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:57.743 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:43:57.745 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"662"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:43:57.745 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9tjTGONJHhWxtcWz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14113/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14113/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:43:57.745 [print] {
"resourceType": "Patient",
"id": "14113",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:02.396+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DANIEL <b>GOMEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>119337</td></tr><tr><td>Date of birth</td><td><span>02 April 2013</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "119337"
}
],
"name": [
{
"use": "anonymous",
"text": "DANIEL GOMEZ ",
"family": "GOMEZ",
"given": [
"DANIEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "maude84@gmail.com"
},
{
"system": "phone",
"value": "34 (962) 355-8068"
}
],
"gender": "male",
"birthDate": "2013-04-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:43:57.745 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:43:58.674 [print] {
"resourceType": "Patient",
"id": "14113",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:02.396+02:00",
"source": "#9tjTGONJHhWxtcWz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DANIEL <b>GOMEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>119337</td></tr><tr><td>Date of birth</td><td><span>02 April 2013</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "119337"
}
],
"name": [
{
"use": "anonymous",
"text": "DANIEL GOMEZ ",
"family": "GOMEZ",
"given": [
"DANIEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "maude84@gmail.com"
},
{
"system": "phone",
"value": "34 (962) 355-8068"
}
],
"gender": "male",
"birthDate": "2013-04-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:43:59.314 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:43:59.954 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:03.982+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:03.982+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:43:59.955 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRESPO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "163935"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE CARLOS FERRER CRESPO",
"family": "FERRER",
"given": [
"JOSE CARLOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "htrantow@yahoo.com"
},
{
"system": "phone",
"value": "34 (980) 334-4533"
}
],
"gender": "male",
"birthDate": "2013-10-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:00.633 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:00.633 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nCWEqBbgqPyeHm28"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14114/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14114/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:00.633 [print] {
"resourceType": "Patient",
"id": "14114",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:05.288+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE CARLOS <b>FERRER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>163935</td></tr><tr><td>Date of birth</td><td><span>23 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRESPO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "163935"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE CARLOS FERRER CRESPO",
"family": "FERRER",
"given": [
"JOSE CARLOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "htrantow@yahoo.com"
},
{
"system": "phone",
"value": "34 (980) 334-4533"
}
],
"gender": "male",
"birthDate": "2013-10-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:00.633 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:00.633 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:00.633 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nCWEqBbgqPyeHm28"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14114/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14114/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:00.633 [print] {
"resourceType": "Patient",
"id": "14114",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:05.288+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE CARLOS <b>FERRER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>163935</td></tr><tr><td>Date of birth</td><td><span>23 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRESPO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "163935"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE CARLOS FERRER CRESPO",
"family": "FERRER",
"given": [
"JOSE CARLOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "htrantow@yahoo.com"
},
{
"system": "phone",
"value": "34 (980) 334-4533"
}
],
"gender": "male",
"birthDate": "2013-10-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:00.633 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:01.223 [print] {
"resourceType": "Patient",
"id": "14114",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:05.288+02:00",
"source": "#nCWEqBbgqPyeHm28",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOSE CARLOS <b>FERRER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>163935</td></tr><tr><td>Date of birth</td><td><span>23 October 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRESPO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "163935"
}
],
"name": [
{
"use": "anonymous",
"text": "JOSE CARLOS FERRER CRESPO",
"family": "FERRER",
"given": [
"JOSE CARLOS"
]
}
],
"telecom": [
{
"system": "email",
"value": "htrantow@yahoo.com"
},
{
"system": "phone",
"value": "34 (980) 334-4533"
}
],
"gender": "male",
"birthDate": "2013-10-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:01.839 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:02.877 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:06.505+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:06.505+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:02.877 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "REYES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45759"
}
],
"name": [
{
"use": "anonymous",
"text": "JORGE VAZQUEZ REYES",
"family": "VAZQUEZ",
"given": [
"JORGE"
]
}
],
"telecom": [
{
"system": "email",
"value": "edwardo.lubowitz@osinski.com"
}
],
"gender": "male",
"birthDate": "2013-12-19",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:03.489 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"749"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:03.489 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rx3MvTTGIhbfk2JS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14115/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14115/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:03.489 [print] {
"resourceType": "Patient",
"id": "14115",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:08.135+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JORGE <b>VAZQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45759</td></tr><tr><td>Date of birth</td><td><span>19 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "REYES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45759"
}
],
"name": [
{
"use": "anonymous",
"text": "JORGE VAZQUEZ REYES",
"family": "VAZQUEZ",
"given": [
"JORGE"
]
}
],
"telecom": [
{
"system": "email",
"value": "edwardo.lubowitz@osinski.com"
}
],
"gender": "male",
"birthDate": "2013-12-19",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:03.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:03.489 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"749"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:03.489 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rx3MvTTGIhbfk2JS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14115/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14115/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:03.489 [print] {
"resourceType": "Patient",
"id": "14115",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:08.135+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JORGE <b>VAZQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45759</td></tr><tr><td>Date of birth</td><td><span>19 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "REYES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45759"
}
],
"name": [
{
"use": "anonymous",
"text": "JORGE VAZQUEZ REYES",
"family": "VAZQUEZ",
"given": [
"JORGE"
]
}
],
"telecom": [
{
"system": "email",
"value": "edwardo.lubowitz@osinski.com"
}
],
"gender": "male",
"birthDate": "2013-12-19",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:03.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:04.307 [print] {
"resourceType": "Patient",
"id": "14115",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:08.135+02:00",
"source": "#rx3MvTTGIhbfk2JS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JORGE <b>VAZQUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45759</td></tr><tr><td>Date of birth</td><td><span>19 December 2013</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "REYES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45759"
}
],
"name": [
{
"use": "anonymous",
"text": "JORGE VAZQUEZ REYES",
"family": "VAZQUEZ",
"given": [
"JORGE"
]
}
],
"telecom": [
{
"system": "email",
"value": "edwardo.lubowitz@osinski.com"
}
],
"gender": "male",
"birthDate": "2013-12-19",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:05.028 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:05.651 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:09.709+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:09.709+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:05.651 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PARRA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "96093"
}
],
"name": [
{
"use": "anonymous",
"text": "RAUL CASTRO PARRA",
"family": "CASTRO",
"given": [
"RAUL"
]
}
],
"telecom": [
{
"system": "email",
"value": "brekke.eliza@hotmail.com"
}
],
"gender": "male",
"birthDate": "2014-01-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:06.358 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"741"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:06.358 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PzQvDkogJ8DwiZ01"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14116/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14116/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:06.358 [print] {
"resourceType": "Patient",
"id": "14116",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:11.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAUL <b>CASTRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>96093</td></tr><tr><td>Date of birth</td><td><span>10 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PARRA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "96093"
}
],
"name": [
{
"use": "anonymous",
"text": "RAUL CASTRO PARRA",
"family": "CASTRO",
"given": [
"RAUL"
]
}
],
"telecom": [
{
"system": "email",
"value": "brekke.eliza@hotmail.com"
}
],
"gender": "male",
"birthDate": "2014-01-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:06.358 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:06.358 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"741"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:06.358 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PzQvDkogJ8DwiZ01"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14116/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14116/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:06.358 [print] {
"resourceType": "Patient",
"id": "14116",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:11.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAUL <b>CASTRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>96093</td></tr><tr><td>Date of birth</td><td><span>10 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PARRA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "96093"
}
],
"name": [
{
"use": "anonymous",
"text": "RAUL CASTRO PARRA",
"family": "CASTRO",
"given": [
"RAUL"
]
}
],
"telecom": [
{
"system": "email",
"value": "brekke.eliza@hotmail.com"
}
],
"gender": "male",
"birthDate": "2014-01-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:06.358 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:06.939 [print] {
"resourceType": "Patient",
"id": "14116",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:11.006+02:00",
"source": "#PzQvDkogJ8DwiZ01",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAUL <b>CASTRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>96093</td></tr><tr><td>Date of birth</td><td><span>10 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PARRA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "96093"
}
],
"name": [
{
"use": "anonymous",
"text": "RAUL CASTRO PARRA",
"family": "CASTRO",
"given": [
"RAUL"
]
}
],
"telecom": [
{
"system": "email",
"value": "brekke.eliza@hotmail.com"
}
],
"gender": "male",
"birthDate": "2014-01-10",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:07.809 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:08.400 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:12.490+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:12.490+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:08.400 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BRAVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "128043"
}
],
"name": [
{
"use": "anonymous",
"text": "OLGA PARRA BRAVO",
"family": "PARRA",
"given": [
"OLGA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dietrich.bonita@gmail.com"
},
{
"system": "phone",
"value": "34 (625) 718-8941"
}
],
"gender": "female",
"birthDate": "2014-01-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:09.098 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:09.098 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g1HOH9JQMnORX6nB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14117/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14117/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:09.098 [print] {
"resourceType": "Patient",
"id": "14117",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:13.755+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">OLGA <b>PARRA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>128043</td></tr><tr><td>Date of birth</td><td><span>27 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BRAVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "128043"
}
],
"name": [
{
"use": "anonymous",
"text": "OLGA PARRA BRAVO",
"family": "PARRA",
"given": [
"OLGA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dietrich.bonita@gmail.com"
},
{
"system": "phone",
"value": "34 (625) 718-8941"
}
],
"gender": "female",
"birthDate": "2014-01-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:09.098 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:09.098 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:09.098 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g1HOH9JQMnORX6nB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14117/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14117/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:09.098 [print] {
"resourceType": "Patient",
"id": "14117",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:13.755+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">OLGA <b>PARRA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>128043</td></tr><tr><td>Date of birth</td><td><span>27 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BRAVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "128043"
}
],
"name": [
{
"use": "anonymous",
"text": "OLGA PARRA BRAVO",
"family": "PARRA",
"given": [
"OLGA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dietrich.bonita@gmail.com"
},
{
"system": "phone",
"value": "34 (625) 718-8941"
}
],
"gender": "female",
"birthDate": "2014-01-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:09.098 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:09.822 [print] {
"resourceType": "Patient",
"id": "14117",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:13.755+02:00",
"source": "#g1HOH9JQMnORX6nB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">OLGA <b>PARRA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>128043</td></tr><tr><td>Date of birth</td><td><span>27 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "BRAVO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "128043"
}
],
"name": [
{
"use": "anonymous",
"text": "OLGA PARRA BRAVO",
"family": "PARRA",
"given": [
"OLGA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dietrich.bonita@gmail.com"
},
{
"system": "phone",
"value": "34 (625) 718-8941"
}
],
"gender": "female",
"birthDate": "2014-01-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:10.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:11.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:15.141+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:15.141+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:11.107 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DURAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "194635"
}
],
"name": [
{
"use": "anonymous",
"text": "FELIX HIDALGO DURAN",
"family": "HIDALGO",
"given": [
"FELIX"
]
}
],
"telecom": [
{
"system": "email",
"value": "xoberbrunner@senger.info"
},
{
"system": "phone",
"value": "34 (439) 656-1673"
}
],
"gender": "male",
"birthDate": "2014-01-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:11.743 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:11.743 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uCZ4lRSONaQW31Fd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14118/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14118/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:11.743 [print] {
"resourceType": "Patient",
"id": "14118",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:16.386+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FELIX <b>HIDALGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>194635</td></tr><tr><td>Date of birth</td><td><span>30 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DURAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "194635"
}
],
"name": [
{
"use": "anonymous",
"text": "FELIX HIDALGO DURAN",
"family": "HIDALGO",
"given": [
"FELIX"
]
}
],
"telecom": [
{
"system": "email",
"value": "xoberbrunner@senger.info"
},
{
"system": "phone",
"value": "34 (439) 656-1673"
}
],
"gender": "male",
"birthDate": "2014-01-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:11.743 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:11.745 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:11.745 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uCZ4lRSONaQW31Fd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14118/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14118/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:11.745 [print] {
"resourceType": "Patient",
"id": "14118",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:16.386+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FELIX <b>HIDALGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>194635</td></tr><tr><td>Date of birth</td><td><span>30 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DURAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "194635"
}
],
"name": [
{
"use": "anonymous",
"text": "FELIX HIDALGO DURAN",
"family": "HIDALGO",
"given": [
"FELIX"
]
}
],
"telecom": [
{
"system": "email",
"value": "xoberbrunner@senger.info"
},
{
"system": "phone",
"value": "34 (439) 656-1673"
}
],
"gender": "male",
"birthDate": "2014-01-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:11.745 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:12.324 [print] {
"resourceType": "Patient",
"id": "14118",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:16.386+02:00",
"source": "#uCZ4lRSONaQW31Fd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">FELIX <b>HIDALGO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>194635</td></tr><tr><td>Date of birth</td><td><span>30 January 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "DURAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "194635"
}
],
"name": [
{
"use": "anonymous",
"text": "FELIX HIDALGO DURAN",
"family": "HIDALGO",
"given": [
"FELIX"
]
}
],
"telecom": [
{
"system": "email",
"value": "xoberbrunner@senger.info"
},
{
"system": "phone",
"value": "34 (439) 656-1673"
}
],
"gender": "male",
"birthDate": "2014-01-30",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:12.973 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:13.597 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:17.642+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:17.642+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:13.599 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SAEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "85565"
}
],
"name": [
{
"use": "anonymous",
"text": "RAFAEL ALVAREZ SAEZ",
"family": "ALVAREZ",
"given": [
"RAFAEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "ernie76@hotmail.com"
},
{
"system": "phone",
"value": "34 (890) 596-0773"
}
],
"gender": "male",
"birthDate": "2014-03-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:14.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:14.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CT6DS4cVFoKCFkHh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14119/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14119/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:14.467 [print] {
"resourceType": "Patient",
"id": "14119",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:19.116+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAFAEL <b>ALVAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>85565</td></tr><tr><td>Date of birth</td><td><span>05 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SAEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "85565"
}
],
"name": [
{
"use": "anonymous",
"text": "RAFAEL ALVAREZ SAEZ",
"family": "ALVAREZ",
"given": [
"RAFAEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "ernie76@hotmail.com"
},
{
"system": "phone",
"value": "34 (890) 596-0773"
}
],
"gender": "male",
"birthDate": "2014-03-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:14.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:14.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"787"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:14.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CT6DS4cVFoKCFkHh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14119/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14119/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:14.467 [print] {
"resourceType": "Patient",
"id": "14119",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:19.116+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAFAEL <b>ALVAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>85565</td></tr><tr><td>Date of birth</td><td><span>05 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SAEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "85565"
}
],
"name": [
{
"use": "anonymous",
"text": "RAFAEL ALVAREZ SAEZ",
"family": "ALVAREZ",
"given": [
"RAFAEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "ernie76@hotmail.com"
},
{
"system": "phone",
"value": "34 (890) 596-0773"
}
],
"gender": "male",
"birthDate": "2014-03-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:14.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:15.054 [print] {
"resourceType": "Patient",
"id": "14119",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:19.116+02:00",
"source": "#CT6DS4cVFoKCFkHh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">RAFAEL <b>ALVAREZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>85565</td></tr><tr><td>Date of birth</td><td><span>05 March 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "SAEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "85565"
}
],
"name": [
{
"use": "anonymous",
"text": "RAFAEL ALVAREZ SAEZ",
"family": "ALVAREZ",
"given": [
"RAFAEL"
]
}
],
"telecom": [
{
"system": "email",
"value": "ernie76@hotmail.com"
},
{
"system": "phone",
"value": "34 (890) 596-0773"
}
],
"gender": "male",
"birthDate": "2014-03-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:15.661 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:16.250 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:20.325+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:20.325+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:16.251 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LEON"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40512"
}
],
"name": [
{
"use": "anonymous",
"text": "NATALIA PEÑA LEON",
"family": "PEÑA",
"given": [
"NATALIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hanna.morar@yahoo.com"
},
{
"system": "phone",
"value": "34 (715) 328-0095"
}
],
"gender": "female",
"birthDate": "2014-04-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:17.291 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:17.291 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wrBKDPSsVzi8KUXF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14120/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14120/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:17.291 [print] {
"resourceType": "Patient",
"id": "14120",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:21.944+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NATALIA <b>PEÑA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40512</td></tr><tr><td>Date of birth</td><td><span>21 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LEON"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40512"
}
],
"name": [
{
"use": "anonymous",
"text": "NATALIA PEÑA LEON",
"family": "PEÑA",
"given": [
"NATALIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hanna.morar@yahoo.com"
},
{
"system": "phone",
"value": "34 (715) 328-0095"
}
],
"gender": "female",
"birthDate": "2014-04-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:17.291 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:17.291 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:17.291 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wrBKDPSsVzi8KUXF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14120/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14120/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:17.291 [print] {
"resourceType": "Patient",
"id": "14120",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:21.944+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NATALIA <b>PEÑA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40512</td></tr><tr><td>Date of birth</td><td><span>21 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LEON"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40512"
}
],
"name": [
{
"use": "anonymous",
"text": "NATALIA PEÑA LEON",
"family": "PEÑA",
"given": [
"NATALIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hanna.morar@yahoo.com"
},
{
"system": "phone",
"value": "34 (715) 328-0095"
}
],
"gender": "female",
"birthDate": "2014-04-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:17.291 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:17.889 [print] {
"resourceType": "Patient",
"id": "14120",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:21.944+02:00",
"source": "#wrBKDPSsVzi8KUXF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">NATALIA <b>PEÑA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>40512</td></tr><tr><td>Date of birth</td><td><span>21 April 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LEON"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "40512"
}
],
"name": [
{
"use": "anonymous",
"text": "NATALIA PEÑA LEON",
"family": "PEÑA",
"given": [
"NATALIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "hanna.morar@yahoo.com"
},
{
"system": "phone",
"value": "34 (715) 328-0095"
}
],
"gender": "female",
"birthDate": "2014-04-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:18.507 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:20.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:23.186+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:23.186+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:20.183 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CAMPOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "2986"
}
],
"name": [
{
"use": "anonymous",
"text": "MATEO CRESPO CAMPOS",
"family": "CRESPO",
"given": [
"MATEO"
]
}
],
"telecom": [
{
"system": "email",
"value": "boconner@vonrueden.com"
},
{
"system": "phone",
"value": "34 (999) 202-1374"
}
],
"gender": "male",
"birthDate": "2014-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:20.852 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:20.852 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NEIlBzZ2IUo2Pkds"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14121/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14121/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:20.852 [print] {
"resourceType": "Patient",
"id": "14121",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:25.503+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MATEO <b>CRESPO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>2986</td></tr><tr><td>Date of birth</td><td><span>01 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CAMPOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "2986"
}
],
"name": [
{
"use": "anonymous",
"text": "MATEO CRESPO CAMPOS",
"family": "CRESPO",
"given": [
"MATEO"
]
}
],
"telecom": [
{
"system": "email",
"value": "boconner@vonrueden.com"
},
{
"system": "phone",
"value": "34 (999) 202-1374"
}
],
"gender": "male",
"birthDate": "2014-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:20.852 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:20.854 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:20.854 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NEIlBzZ2IUo2Pkds"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14121/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14121/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:20.854 [print] {
"resourceType": "Patient",
"id": "14121",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:25.503+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MATEO <b>CRESPO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>2986</td></tr><tr><td>Date of birth</td><td><span>01 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CAMPOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "2986"
}
],
"name": [
{
"use": "anonymous",
"text": "MATEO CRESPO CAMPOS",
"family": "CRESPO",
"given": [
"MATEO"
]
}
],
"telecom": [
{
"system": "email",
"value": "boconner@vonrueden.com"
},
{
"system": "phone",
"value": "34 (999) 202-1374"
}
],
"gender": "male",
"birthDate": "2014-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:20.854 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:21.449 [print] {
"resourceType": "Patient",
"id": "14121",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:25.503+02:00",
"source": "#NEIlBzZ2IUo2Pkds",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MATEO <b>CRESPO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>2986</td></tr><tr><td>Date of birth</td><td><span>01 May 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CAMPOS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "2986"
}
],
"name": [
{
"use": "anonymous",
"text": "MATEO CRESPO CAMPOS",
"family": "CRESPO",
"given": [
"MATEO"
]
}
],
"telecom": [
{
"system": "email",
"value": "boconner@vonrueden.com"
},
{
"system": "phone",
"value": "34 (999) 202-1374"
}
],
"gender": "male",
"birthDate": "2014-05-01",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:22.070 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:31.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:26.741+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:26.741+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:31.954 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "8973"
}
],
"name": [
{
"use": "anonymous",
"text": "AMPARO MORA CASTRO",
"family": "MORA",
"given": [
"AMPARO"
]
}
],
"telecom": [
{
"system": "email",
"value": "karley.roob@hotmail.com"
},
{
"system": "phone",
"value": "34 (585) 416-4299"
}
],
"gender": "female",
"birthDate": "2014-09-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:32.592 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:32.592 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"llJuAET5LjnJxsqZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14122/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14122/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:32.592 [print] {
"resourceType": "Patient",
"id": "14122",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:37.241+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AMPARO <b>MORA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>8973</td></tr><tr><td>Date of birth</td><td><span>11 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "8973"
}
],
"name": [
{
"use": "anonymous",
"text": "AMPARO MORA CASTRO",
"family": "MORA",
"given": [
"AMPARO"
]
}
],
"telecom": [
{
"system": "email",
"value": "karley.roob@hotmail.com"
},
{
"system": "phone",
"value": "34 (585) 416-4299"
}
],
"gender": "female",
"birthDate": "2014-09-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:32.592 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:32.592 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:32.592 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"llJuAET5LjnJxsqZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14122/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14122/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:32.592 [print] {
"resourceType": "Patient",
"id": "14122",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:37.241+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AMPARO <b>MORA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>8973</td></tr><tr><td>Date of birth</td><td><span>11 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "8973"
}
],
"name": [
{
"use": "anonymous",
"text": "AMPARO MORA CASTRO",
"family": "MORA",
"given": [
"AMPARO"
]
}
],
"telecom": [
{
"system": "email",
"value": "karley.roob@hotmail.com"
},
{
"system": "phone",
"value": "34 (585) 416-4299"
}
],
"gender": "female",
"birthDate": "2014-09-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:32.592 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:33.494 [print] {
"resourceType": "Patient",
"id": "14122",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:37.241+02:00",
"source": "#llJuAET5LjnJxsqZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AMPARO <b>MORA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>8973</td></tr><tr><td>Date of birth</td><td><span>11 September 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CASTRO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "8973"
}
],
"name": [
{
"use": "anonymous",
"text": "AMPARO MORA CASTRO",
"family": "MORA",
"given": [
"AMPARO"
]
}
],
"telecom": [
{
"system": "email",
"value": "karley.roob@hotmail.com"
},
{
"system": "phone",
"value": "34 (585) 416-4299"
}
],
"gender": "female",
"birthDate": "2014-09-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:34.333 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:34.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:38.991+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:38.991+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:34.938 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VAZQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "148109"
}
],
"name": [
{
"use": "anonymous",
"text": "DAVID LOPEZ VAZQUEZ",
"family": "LOPEZ",
"given": [
"DAVID"
]
}
],
"telecom": [
{
"system": "email",
"value": "easter.rohan@ryan.com"
},
{
"system": "phone",
"value": "34 (906) 316-6964"
}
],
"gender": "male",
"birthDate": "2014-10-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:35.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:35.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BOFQDsHbYZjo7Aua"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14123/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14123/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:39 GMT"
],
"Connection": [
"close"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:35.620 [print] {
"resourceType": "Patient",
"id": "14123",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:40.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DAVID <b>LOPEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>148109</td></tr><tr><td>Date of birth</td><td><span>08 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VAZQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "148109"
}
],
"name": [
{
"use": "anonymous",
"text": "DAVID LOPEZ VAZQUEZ",
"family": "LOPEZ",
"given": [
"DAVID"
]
}
],
"telecom": [
{
"system": "email",
"value": "easter.rohan@ryan.com"
},
{
"system": "phone",
"value": "34 (906) 316-6964"
}
],
"gender": "male",
"birthDate": "2014-10-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:35.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:35.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:35.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BOFQDsHbYZjo7Aua"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14123/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14123/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:39 GMT"
],
"Connection": [
"close"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:35.620 [print] {
"resourceType": "Patient",
"id": "14123",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:40.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DAVID <b>LOPEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>148109</td></tr><tr><td>Date of birth</td><td><span>08 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VAZQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "148109"
}
],
"name": [
{
"use": "anonymous",
"text": "DAVID LOPEZ VAZQUEZ",
"family": "LOPEZ",
"given": [
"DAVID"
]
}
],
"telecom": [
{
"system": "email",
"value": "easter.rohan@ryan.com"
},
{
"system": "phone",
"value": "34 (906) 316-6964"
}
],
"gender": "male",
"birthDate": "2014-10-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:35.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:37.041 [print] {
"resourceType": "Patient",
"id": "14123",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:40.272+02:00",
"source": "#BOFQDsHbYZjo7Aua",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">DAVID <b>LOPEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>148109</td></tr><tr><td>Date of birth</td><td><span>08 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VAZQUEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "148109"
}
],
"name": [
{
"use": "anonymous",
"text": "DAVID LOPEZ VAZQUEZ",
"family": "LOPEZ",
"given": [
"DAVID"
]
}
],
"telecom": [
{
"system": "email",
"value": "easter.rohan@ryan.com"
},
{
"system": "phone",
"value": "34 (906) 316-6964"
}
],
"gender": "male",
"birthDate": "2014-10-08",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:37.706 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:38.325 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:42.343+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:42.343+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:38.327 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROJAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "136432"
}
],
"name": [
{
"use": "anonymous",
"text": "PAULA TORRES ROJAS",
"family": "TORRES",
"given": [
"PAULA"
]
}
],
"telecom": [
{
"system": "email",
"value": "demarcus.frami@goyette.com"
},
{
"system": "phone",
"value": "34 (675) 513-1132"
}
],
"gender": "female",
"birthDate": "2014-10-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:38.971 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:38.971 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PgBj93OLxSJG9Xwr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14124/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14124/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:38.971 [print] {
"resourceType": "Patient",
"id": "14124",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:43.615+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PAULA <b>TORRES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>136432</td></tr><tr><td>Date of birth</td><td><span>21 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROJAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "136432"
}
],
"name": [
{
"use": "anonymous",
"text": "PAULA TORRES ROJAS",
"family": "TORRES",
"given": [
"PAULA"
]
}
],
"telecom": [
{
"system": "email",
"value": "demarcus.frami@goyette.com"
},
{
"system": "phone",
"value": "34 (675) 513-1132"
}
],
"gender": "female",
"birthDate": "2014-10-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:38.971 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:38.971 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:38.971 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PgBj93OLxSJG9Xwr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14124/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14124/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:38.971 [print] {
"resourceType": "Patient",
"id": "14124",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:43.615+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PAULA <b>TORRES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>136432</td></tr><tr><td>Date of birth</td><td><span>21 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROJAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "136432"
}
],
"name": [
{
"use": "anonymous",
"text": "PAULA TORRES ROJAS",
"family": "TORRES",
"given": [
"PAULA"
]
}
],
"telecom": [
{
"system": "email",
"value": "demarcus.frami@goyette.com"
},
{
"system": "phone",
"value": "34 (675) 513-1132"
}
],
"gender": "female",
"birthDate": "2014-10-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:38.971 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:39.685 [print] {
"resourceType": "Patient",
"id": "14124",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:43.615+02:00",
"source": "#PgBj93OLxSJG9Xwr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">PAULA <b>TORRES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>136432</td></tr><tr><td>Date of birth</td><td><span>21 October 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROJAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "136432"
}
],
"name": [
{
"use": "anonymous",
"text": "PAULA TORRES ROJAS",
"family": "TORRES",
"given": [
"PAULA"
]
}
],
"telecom": [
{
"system": "email",
"value": "demarcus.frami@goyette.com"
},
{
"system": "phone",
"value": "34 (675) 513-1132"
}
],
"gender": "female",
"birthDate": "2014-10-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:40.332 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:40.915 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:44.990+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:44.990+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:40.916 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUTIERREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "87255"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ROSARIO REYES GUTIERREZ",
"family": "REYES",
"given": [
"MARIA ROSARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "oweber@hotmail.com"
},
{
"system": "phone",
"value": "34 (604) 432-3867"
}
],
"gender": "female",
"birthDate": "2014-11-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:42.181 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:42.181 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"x5qt0MRJefOkhPzr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14125/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14125/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:42.181 [print] {
"resourceType": "Patient",
"id": "14125",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:46.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ROSARIO <b>REYES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>87255</td></tr><tr><td>Date of birth</td><td><span>24 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUTIERREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "87255"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ROSARIO REYES GUTIERREZ",
"family": "REYES",
"given": [
"MARIA ROSARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "oweber@hotmail.com"
},
{
"system": "phone",
"value": "34 (604) 432-3867"
}
],
"gender": "female",
"birthDate": "2014-11-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:42.181 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:42.183 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:42.183 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"x5qt0MRJefOkhPzr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14125/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14125/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:42.183 [print] {
"resourceType": "Patient",
"id": "14125",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:46.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ROSARIO <b>REYES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>87255</td></tr><tr><td>Date of birth</td><td><span>24 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUTIERREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "87255"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ROSARIO REYES GUTIERREZ",
"family": "REYES",
"given": [
"MARIA ROSARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "oweber@hotmail.com"
},
{
"system": "phone",
"value": "34 (604) 432-3867"
}
],
"gender": "female",
"birthDate": "2014-11-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:42.183 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:43.837 [print] {
"resourceType": "Patient",
"id": "14125",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:46.258+02:00",
"source": "#x5qt0MRJefOkhPzr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA ROSARIO <b>REYES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>87255</td></tr><tr><td>Date of birth</td><td><span>24 November 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GUTIERREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "87255"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA ROSARIO REYES GUTIERREZ",
"family": "REYES",
"given": [
"MARIA ROSARIO"
]
}
],
"telecom": [
{
"system": "email",
"value": "oweber@hotmail.com"
},
{
"system": "phone",
"value": "34 (604) 432-3867"
}
],
"gender": "female",
"birthDate": "2014-11-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:44.499 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:45.552 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:49.166+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:49.166+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:45.554 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "154985"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN CARLOS MORALES PEREZ",
"family": "MORALES",
"given": [
"JUAN CARLOS"
]
}
],
"telecom": [
],
"gender": "male",
"birthDate": "2014-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:46.433 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"705"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:46.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DEJcvOIMoHunE2HB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14126/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14126/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:46.433 [print] {
"resourceType": "Patient",
"id": "14126",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:51.063+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN CARLOS <b>MORALES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>154985</td></tr><tr><td>Date of birth</td><td><span>05 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "154985"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN CARLOS MORALES PEREZ",
"family": "MORALES",
"given": [
"JUAN CARLOS"
]
}
],
"gender": "male",
"birthDate": "2014-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:46.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:46.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"705"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:46.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DEJcvOIMoHunE2HB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14126/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14126/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:46.435 [print] {
"resourceType": "Patient",
"id": "14126",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:51.063+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN CARLOS <b>MORALES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>154985</td></tr><tr><td>Date of birth</td><td><span>05 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "154985"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN CARLOS MORALES PEREZ",
"family": "MORALES",
"given": [
"JUAN CARLOS"
]
}
],
"gender": "male",
"birthDate": "2014-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:46.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:47.106 [print] {
"resourceType": "Patient",
"id": "14126",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:51.063+02:00",
"source": "#DEJcvOIMoHunE2HB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JUAN CARLOS <b>MORALES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>154985</td></tr><tr><td>Date of birth</td><td><span>05 December 2014</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "PEREZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "154985"
}
],
"name": [
{
"use": "anonymous",
"text": "JUAN CARLOS MORALES PEREZ",
"family": "MORALES",
"given": [
"JUAN CARLOS"
]
}
],
"gender": "male",
"birthDate": "2014-12-05",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:48.524 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:49.158 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:53.182+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:53.182+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:49.160 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FLORES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "201940"
}
],
"name": [
{
"use": "anonymous",
"text": "CRISTIAN VARGAS FLORES",
"family": "VARGAS",
"given": [
"CRISTIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "elissa.swift@white.com"
},
{
"system": "phone",
"value": "34 (609) 335-0484"
}
],
"gender": "male",
"birthDate": "2015-06-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:49.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:49.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yDNmwxSa8bUpIbcj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14127/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14127/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:49.791 [print] {
"resourceType": "Patient",
"id": "14127",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:54.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CRISTIAN <b>VARGAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>201940</td></tr><tr><td>Date of birth</td><td><span>11 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FLORES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "201940"
}
],
"name": [
{
"use": "anonymous",
"text": "CRISTIAN VARGAS FLORES",
"family": "VARGAS",
"given": [
"CRISTIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "elissa.swift@white.com"
},
{
"system": "phone",
"value": "34 (609) 335-0484"
}
],
"gender": "male",
"birthDate": "2015-06-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:49.791 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:49.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:49.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yDNmwxSa8bUpIbcj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14127/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14127/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:49.808 [print] {
"resourceType": "Patient",
"id": "14127",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:54.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CRISTIAN <b>VARGAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>201940</td></tr><tr><td>Date of birth</td><td><span>11 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FLORES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "201940"
}
],
"name": [
{
"use": "anonymous",
"text": "CRISTIAN VARGAS FLORES",
"family": "VARGAS",
"given": [
"CRISTIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "elissa.swift@white.com"
},
{
"system": "phone",
"value": "34 (609) 335-0484"
}
],
"gender": "male",
"birthDate": "2015-06-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:49.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:50.824 [print] {
"resourceType": "Patient",
"id": "14127",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:54.441+02:00",
"source": "#yDNmwxSa8bUpIbcj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">CRISTIAN <b>VARGAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>201940</td></tr><tr><td>Date of birth</td><td><span>11 June 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FLORES"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "201940"
}
],
"name": [
{
"use": "anonymous",
"text": "CRISTIAN VARGAS FLORES",
"family": "VARGAS",
"given": [
"CRISTIAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "elissa.swift@white.com"
},
{
"system": "phone",
"value": "34 (609) 335-0484"
}
],
"gender": "male",
"birthDate": "2015-06-11",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:51.955 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:52.627 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:44:56.619+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:44:56.619+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:52.630 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VARGAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "206243"
}
],
"name": [
{
"use": "anonymous",
"text": "LAURA MARTINEZ VARGAS",
"family": "MARTINEZ",
"given": [
"LAURA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kovacek.tiffany@keeling.com"
},
{
"system": "phone",
"value": "34 (282) 695-3875"
}
],
"gender": "female",
"birthDate": "2015-08-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:53.722 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:53.722 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1aqMvIclAs3nYdcq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14128/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14128/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:53.722 [print] {
"resourceType": "Patient",
"id": "14128",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:58.363+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LAURA <b>MARTINEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>206243</td></tr><tr><td>Date of birth</td><td><span>17 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VARGAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "206243"
}
],
"name": [
{
"use": "anonymous",
"text": "LAURA MARTINEZ VARGAS",
"family": "MARTINEZ",
"given": [
"LAURA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kovacek.tiffany@keeling.com"
},
{
"system": "phone",
"value": "34 (282) 695-3875"
}
],
"gender": "female",
"birthDate": "2015-08-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:53.722 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:53.724 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:53.724 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1aqMvIclAs3nYdcq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14128/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:44:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14128/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:44:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:53.724 [print] {
"resourceType": "Patient",
"id": "14128",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:58.363+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LAURA <b>MARTINEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>206243</td></tr><tr><td>Date of birth</td><td><span>17 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VARGAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "206243"
}
],
"name": [
{
"use": "anonymous",
"text": "LAURA MARTINEZ VARGAS",
"family": "MARTINEZ",
"given": [
"LAURA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kovacek.tiffany@keeling.com"
},
{
"system": "phone",
"value": "34 (282) 695-3875"
}
],
"gender": "female",
"birthDate": "2015-08-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:53.724 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:54.355 [print] {
"resourceType": "Patient",
"id": "14128",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:44:58.363+02:00",
"source": "#1aqMvIclAs3nYdcq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">LAURA <b>MARTINEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>206243</td></tr><tr><td>Date of birth</td><td><span>17 August 2015</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VARGAS"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "206243"
}
],
"name": [
{
"use": "anonymous",
"text": "LAURA MARTINEZ VARGAS",
"family": "MARTINEZ",
"given": [
"LAURA"
]
}
],
"telecom": [
{
"system": "email",
"value": "kovacek.tiffany@keeling.com"
},
{
"system": "phone",
"value": "34 (282) 695-3875"
}
],
"gender": "female",
"birthDate": "2015-08-17",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:55.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:56.599 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:00.629+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:00.629+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:56.601 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "81358"
}
],
"name": [
{
"use": "anonymous",
"text": "SILVIA DELGADO ORTEGA",
"family": "DELGADO",
"given": [
"SILVIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "mills.delbert@cartwright.com"
},
{
"system": "phone",
"value": "34 (299) 487-9567"
}
],
"gender": "female",
"birthDate": "2016-05-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:57.310 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:57.311 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1M7HPVuZuzW7masB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14129/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14129/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:57.311 [print] {
"resourceType": "Patient",
"id": "14129",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:01.953+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SILVIA <b>DELGADO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>81358</td></tr><tr><td>Date of birth</td><td><span>27 May 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "81358"
}
],
"name": [
{
"use": "anonymous",
"text": "SILVIA DELGADO ORTEGA",
"family": "DELGADO",
"given": [
"SILVIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "mills.delbert@cartwright.com"
},
{
"system": "phone",
"value": "34 (299) 487-9567"
}
],
"gender": "female",
"birthDate": "2016-05-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:57.311 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:44:57.312 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:44:57.312 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1M7HPVuZuzW7masB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14129/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14129/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:44:57.312 [print] {
"resourceType": "Patient",
"id": "14129",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:01.953+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SILVIA <b>DELGADO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>81358</td></tr><tr><td>Date of birth</td><td><span>27 May 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "81358"
}
],
"name": [
{
"use": "anonymous",
"text": "SILVIA DELGADO ORTEGA",
"family": "DELGADO",
"given": [
"SILVIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "mills.delbert@cartwright.com"
},
{
"system": "phone",
"value": "34 (299) 487-9567"
}
],
"gender": "female",
"birthDate": "2016-05-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:44:57.312 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:44:57.937 [print] {
"resourceType": "Patient",
"id": "14129",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:01.953+02:00",
"source": "#1M7HPVuZuzW7masB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SILVIA <b>DELGADO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>81358</td></tr><tr><td>Date of birth</td><td><span>27 May 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ORTEGA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "81358"
}
],
"name": [
{
"use": "anonymous",
"text": "SILVIA DELGADO ORTEGA",
"family": "DELGADO",
"given": [
"SILVIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "mills.delbert@cartwright.com"
},
{
"system": "phone",
"value": "34 (299) 487-9567"
}
],
"gender": "female",
"birthDate": "2016-05-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:44:58.751 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:44:59.405 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:03.417+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:03.417+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:44:59.405 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARCIA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98229"
}
],
"name": [
{
"use": "anonymous",
"text": "AGUSTIN NIETO GARCIA",
"family": "NIETO",
"given": [
"AGUSTIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "tania11@kovacek.biz"
},
{
"system": "phone",
"value": "34 (617) 379-7964"
}
],
"gender": "male",
"birthDate": "2016-07-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:00.041 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:00.041 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CLXzjhxBKGW1vf0H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14130/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14130/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:00.041 [print] {
"resourceType": "Patient",
"id": "14130",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:04.705+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AGUSTIN <b>NIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98229</td></tr><tr><td>Date of birth</td><td><span>21 July 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARCIA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98229"
}
],
"name": [
{
"use": "anonymous",
"text": "AGUSTIN NIETO GARCIA",
"family": "NIETO",
"given": [
"AGUSTIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "tania11@kovacek.biz"
},
{
"system": "phone",
"value": "34 (617) 379-7964"
}
],
"gender": "male",
"birthDate": "2016-07-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:00.041 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:00.057 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"789"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:00.057 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CLXzjhxBKGW1vf0H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14130/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14130/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:00.057 [print] {
"resourceType": "Patient",
"id": "14130",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:04.705+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AGUSTIN <b>NIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98229</td></tr><tr><td>Date of birth</td><td><span>21 July 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARCIA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98229"
}
],
"name": [
{
"use": "anonymous",
"text": "AGUSTIN NIETO GARCIA",
"family": "NIETO",
"given": [
"AGUSTIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "tania11@kovacek.biz"
},
{
"system": "phone",
"value": "34 (617) 379-7964"
}
],
"gender": "male",
"birthDate": "2016-07-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:00.057 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:45:00.669 [print] {
"resourceType": "Patient",
"id": "14130",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:04.705+02:00",
"source": "#CLXzjhxBKGW1vf0H",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">AGUSTIN <b>NIETO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98229</td></tr><tr><td>Date of birth</td><td><span>21 July 2016</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "GARCIA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98229"
}
],
"name": [
{
"use": "anonymous",
"text": "AGUSTIN NIETO GARCIA",
"family": "NIETO",
"given": [
"AGUSTIN"
]
}
],
"telecom": [
{
"system": "email",
"value": "tania11@kovacek.biz"
},
{
"system": "phone",
"value": "34 (617) 379-7964"
}
],
"gender": "male",
"birthDate": "2016-07-21",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:45:01.300 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:45:01.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:05.964+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:05.964+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:45:01.959 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOPEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "126092"
}
],
"name": [
{
"use": "anonymous",
"text": "JORDI HERRERA LOPEZ",
"family": "HERRERA",
"given": [
"JORDI"
]
}
],
"telecom": [
{
"system": "email",
"value": "beier.jalen@gmail.com"
},
{
"system": "phone",
"value": "34 (454) 549-2070"
}
],
"gender": "male",
"birthDate": "2017-01-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:02.897 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:02.897 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kdmdUaCEDnc7qcXw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14131/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14131/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:02.897 [print] {
"resourceType": "Patient",
"id": "14131",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:07.542+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JORDI <b>HERRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>126092</td></tr><tr><td>Date of birth</td><td><span>25 January 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOPEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "126092"
}
],
"name": [
{
"use": "anonymous",
"text": "JORDI HERRERA LOPEZ",
"family": "HERRERA",
"given": [
"JORDI"
]
}
],
"telecom": [
{
"system": "email",
"value": "beier.jalen@gmail.com"
},
{
"system": "phone",
"value": "34 (454) 549-2070"
}
],
"gender": "male",
"birthDate": "2017-01-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:02.897 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:02.899 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"790"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:02.899 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kdmdUaCEDnc7qcXw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14131/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14131/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:02.899 [print] {
"resourceType": "Patient",
"id": "14131",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:07.542+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JORDI <b>HERRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>126092</td></tr><tr><td>Date of birth</td><td><span>25 January 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOPEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "126092"
}
],
"name": [
{
"use": "anonymous",
"text": "JORDI HERRERA LOPEZ",
"family": "HERRERA",
"given": [
"JORDI"
]
}
],
"telecom": [
{
"system": "email",
"value": "beier.jalen@gmail.com"
},
{
"system": "phone",
"value": "34 (454) 549-2070"
}
],
"gender": "male",
"birthDate": "2017-01-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:02.899 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:45:03.554 [print] {
"resourceType": "Patient",
"id": "14131",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:07.542+02:00",
"source": "#kdmdUaCEDnc7qcXw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JORDI <b>HERRERA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>126092</td></tr><tr><td>Date of birth</td><td><span>25 January 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "LOPEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "126092"
}
],
"name": [
{
"use": "anonymous",
"text": "JORDI HERRERA LOPEZ",
"family": "HERRERA",
"given": [
"JORDI"
]
}
],
"telecom": [
{
"system": "email",
"value": "beier.jalen@gmail.com"
},
{
"system": "phone",
"value": "34 (454) 549-2070"
}
],
"gender": "male",
"birthDate": "2017-01-25",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:45:04.294 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:45:04.964 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:08.960+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:08.960+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:45:04.965 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45481"
}
],
"name": [
{
"use": "anonymous",
"text": "JOAN MONTERO FERNANDEZ",
"family": "MONTERO",
"given": [
"JOAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "junior.roberts@leffler.info"
},
{
"system": "phone",
"value": "34 (852) 896-0169"
}
],
"gender": "male",
"birthDate": "2017-02-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:05.556 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:05.556 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kviq4oSqsGaZvMXu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14132/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14132/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:05.556 [print] {
"resourceType": "Patient",
"id": "14132",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:10.213+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOAN <b>MONTERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45481</td></tr><tr><td>Date of birth</td><td><span>02 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45481"
}
],
"name": [
{
"use": "anonymous",
"text": "JOAN MONTERO FERNANDEZ",
"family": "MONTERO",
"given": [
"JOAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "junior.roberts@leffler.info"
},
{
"system": "phone",
"value": "34 (852) 896-0169"
}
],
"gender": "male",
"birthDate": "2017-02-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:05.556 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:05.556 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:05.556 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kviq4oSqsGaZvMXu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14132/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14132/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:05.556 [print] {
"resourceType": "Patient",
"id": "14132",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:10.213+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOAN <b>MONTERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45481</td></tr><tr><td>Date of birth</td><td><span>02 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45481"
}
],
"name": [
{
"use": "anonymous",
"text": "JOAN MONTERO FERNANDEZ",
"family": "MONTERO",
"given": [
"JOAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "junior.roberts@leffler.info"
},
{
"system": "phone",
"value": "34 (852) 896-0169"
}
],
"gender": "male",
"birthDate": "2017-02-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:05.556 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:45:06.161 [print] {
"resourceType": "Patient",
"id": "14132",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:10.213+02:00",
"source": "#Kviq4oSqsGaZvMXu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">JOAN <b>MONTERO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>45481</td></tr><tr><td>Date of birth</td><td><span>02 February 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "FERNANDEZ"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "45481"
}
],
"name": [
{
"use": "anonymous",
"text": "JOAN MONTERO FERNANDEZ",
"family": "MONTERO",
"given": [
"JOAN"
]
}
],
"telecom": [
{
"system": "email",
"value": "junior.roberts@leffler.info"
},
{
"system": "phone",
"value": "34 (852) 896-0169"
}
],
"gender": "male",
"birthDate": "2017-02-02",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:45:07.757 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:45:09.367 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:12.426+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:12.426+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:45:09.369 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARMONA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157738"
}
],
"name": [
{
"use": "anonymous",
"text": "ALFREDO ROJAS CARMONA",
"family": "ROJAS",
"given": [
"ALFREDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "korbin80@hotmail.com"
},
{
"system": "phone",
"value": "34 (885) 729-2741"
}
],
"gender": "male",
"birthDate": "2017-04-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:15.522 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:15.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NV7drBe7YY6YxNCz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14133/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14133/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:15.522 [print] {
"resourceType": "Patient",
"id": "14133",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:20.170+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALFREDO <b>ROJAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157738</td></tr><tr><td>Date of birth</td><td><span>20 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARMONA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157738"
}
],
"name": [
{
"use": "anonymous",
"text": "ALFREDO ROJAS CARMONA",
"family": "ROJAS",
"given": [
"ALFREDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "korbin80@hotmail.com"
},
{
"system": "phone",
"value": "34 (885) 729-2741"
}
],
"gender": "male",
"birthDate": "2017-04-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:15.522 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:15.522 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:15.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NV7drBe7YY6YxNCz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14133/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14133/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:15.522 [print] {
"resourceType": "Patient",
"id": "14133",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:20.170+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALFREDO <b>ROJAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157738</td></tr><tr><td>Date of birth</td><td><span>20 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARMONA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157738"
}
],
"name": [
{
"use": "anonymous",
"text": "ALFREDO ROJAS CARMONA",
"family": "ROJAS",
"given": [
"ALFREDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "korbin80@hotmail.com"
},
{
"system": "phone",
"value": "34 (885) 729-2741"
}
],
"gender": "male",
"birthDate": "2017-04-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:15.522 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:45:16.130 [print] {
"resourceType": "Patient",
"id": "14133",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:20.170+02:00",
"source": "#NV7drBe7YY6YxNCz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">ALFREDO <b>ROJAS </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>157738</td></tr><tr><td>Date of birth</td><td><span>20 April 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CARMONA"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "157738"
}
],
"name": [
{
"use": "anonymous",
"text": "ALFREDO ROJAS CARMONA",
"family": "ROJAS",
"given": [
"ALFREDO"
]
}
],
"telecom": [
{
"system": "email",
"value": "korbin80@hotmail.com"
},
{
"system": "phone",
"value": "34 (885) 729-2741"
}
],
"gender": "male",
"birthDate": "2017-04-20",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:45:17.029 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:45:17.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:21.684+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:21.684+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:45:17.702 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VIDAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "47550"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CARMEN GARCIA VIDAL",
"family": "GARCIA",
"given": [
"MARIA CARMEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "kim45@hotmail.com"
},
{
"system": "phone",
"value": "34 (253) 637-3555"
}
],
"gender": "female",
"birthDate": "2017-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:18.378 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:18.378 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8b78TQ6bEFJ8MZ0a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14134/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14134/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:18.378 [print] {
"resourceType": "Patient",
"id": "14134",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:23.011+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CARMEN <b>GARCIA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>47550</td></tr><tr><td>Date of birth</td><td><span>22 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VIDAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "47550"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CARMEN GARCIA VIDAL",
"family": "GARCIA",
"given": [
"MARIA CARMEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "kim45@hotmail.com"
},
{
"system": "phone",
"value": "34 (253) 637-3555"
}
],
"gender": "female",
"birthDate": "2017-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:18.378 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:18.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:18.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8b78TQ6bEFJ8MZ0a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14134/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14134/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:18.380 [print] {
"resourceType": "Patient",
"id": "14134",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:23.011+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CARMEN <b>GARCIA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>47550</td></tr><tr><td>Date of birth</td><td><span>22 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VIDAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "47550"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CARMEN GARCIA VIDAL",
"family": "GARCIA",
"given": [
"MARIA CARMEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "kim45@hotmail.com"
},
{
"system": "phone",
"value": "34 (253) 637-3555"
}
],
"gender": "female",
"birthDate": "2017-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:18.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:45:19.041 [print] {
"resourceType": "Patient",
"id": "14134",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:23.011+02:00",
"source": "#8b78TQ6bEFJ8MZ0a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA CARMEN <b>GARCIA </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>47550</td></tr><tr><td>Date of birth</td><td><span>22 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VIDAL"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "47550"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA CARMEN GARCIA VIDAL",
"family": "GARCIA",
"given": [
"MARIA CARMEN"
]
}
],
"telecom": [
{
"system": "email",
"value": "kim45@hotmail.com"
},
{
"system": "phone",
"value": "34 (253) 637-3555"
}
],
"gender": "female",
"birthDate": "2017-08-22",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:45:19.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:45:20.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:24.630+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:24.630+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:45:20.623 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98812"
}
],
"name": [
{
"use": "anonymous",
"text": "SARA NAVARRO ROMAN",
"family": "NAVARRO",
"given": [
"SARA"
]
}
],
"telecom": [
{
"system": "email",
"value": "bartoletti.immanuel@strosin.com"
},
{
"system": "phone",
"value": "34 (648) 927-5087"
}
],
"gender": "female",
"birthDate": "2017-08-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:21.737 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:21.737 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7CT3GNBbqLqisUCP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14135/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14135/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:21.737 [print] {
"resourceType": "Patient",
"id": "14135",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:26.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SARA <b>NAVARRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98812</td></tr><tr><td>Date of birth</td><td><span>23 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98812"
}
],
"name": [
{
"use": "anonymous",
"text": "SARA NAVARRO ROMAN",
"family": "NAVARRO",
"given": [
"SARA"
]
}
],
"telecom": [
{
"system": "email",
"value": "bartoletti.immanuel@strosin.com"
},
{
"system": "phone",
"value": "34 (648) 927-5087"
}
],
"gender": "female",
"birthDate": "2017-08-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:21.737 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:21.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"799"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:21.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7CT3GNBbqLqisUCP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14135/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14135/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:21.739 [print] {
"resourceType": "Patient",
"id": "14135",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:26.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SARA <b>NAVARRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98812</td></tr><tr><td>Date of birth</td><td><span>23 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98812"
}
],
"name": [
{
"use": "anonymous",
"text": "SARA NAVARRO ROMAN",
"family": "NAVARRO",
"given": [
"SARA"
]
}
],
"telecom": [
{
"system": "email",
"value": "bartoletti.immanuel@strosin.com"
},
{
"system": "phone",
"value": "34 (648) 927-5087"
}
],
"gender": "female",
"birthDate": "2017-08-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:21.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:45:22.372 [print] {
"resourceType": "Patient",
"id": "14135",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:26.371+02:00",
"source": "#7CT3GNBbqLqisUCP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">SARA <b>NAVARRO </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>98812</td></tr><tr><td>Date of birth</td><td><span>23 August 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "ROMAN"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "98812"
}
],
"name": [
{
"use": "anonymous",
"text": "SARA NAVARRO ROMAN",
"family": "NAVARRO",
"given": [
"SARA"
]
}
],
"telecom": [
{
"system": "email",
"value": "bartoletti.immanuel@strosin.com"
},
{
"system": "phone",
"value": "34 (648) 927-5087"
}
],
"gender": "female",
"birthDate": "2017-08-23",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:45:23.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:45:24.015 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:27.972+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:27.972+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:45:24.031 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VICENTE"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "18591"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA RODRIGUEZ VICENTE",
"family": "RODRIGUEZ",
"given": [
"MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dayna07@lang.info"
},
{
"system": "phone",
"value": "34 (702) 283-6188"
}
],
"gender": "female",
"birthDate": "2017-11-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:24.687 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:24.687 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y3CjfpuCuJC7kdW3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14136/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14136/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:24.687 [print] {
"resourceType": "Patient",
"id": "14136",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:29.320+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA <b>RODRIGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>18591</td></tr><tr><td>Date of birth</td><td><span>24 November 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VICENTE"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "18591"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA RODRIGUEZ VICENTE",
"family": "RODRIGUEZ",
"given": [
"MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dayna07@lang.info"
},
{
"system": "phone",
"value": "34 (702) 283-6188"
}
],
"gender": "female",
"birthDate": "2017-11-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:24.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:24.690 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"795"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:24.690 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y3CjfpuCuJC7kdW3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14136/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14136/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:24.690 [print] {
"resourceType": "Patient",
"id": "14136",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:29.320+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA <b>RODRIGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>18591</td></tr><tr><td>Date of birth</td><td><span>24 November 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VICENTE"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "18591"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA RODRIGUEZ VICENTE",
"family": "RODRIGUEZ",
"given": [
"MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dayna07@lang.info"
},
{
"system": "phone",
"value": "34 (702) 283-6188"
}
],
"gender": "female",
"birthDate": "2017-11-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:24.690 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:45:25.289 [print] {
"resourceType": "Patient",
"id": "14136",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:29.320+02:00",
"source": "#y3CjfpuCuJC7kdW3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">MARIA <b>RODRIGUEZ </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>18591</td></tr><tr><td>Date of birth</td><td><span>24 November 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "VICENTE"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "18591"
}
],
"name": [
{
"use": "anonymous",
"text": "MARIA RODRIGUEZ VICENTE",
"family": "RODRIGUEZ",
"given": [
"MARIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "dayna07@lang.info"
},
{
"system": "phone",
"value": "34 (702) 283-6188"
}
],
"gender": "female",
"birthDate": "2017-11-24",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:45:25.986 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:45:26.623 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:30.649+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:30.649+02:00"
}
]
}
@Delete
@Post
@Get
@Patient
@Only-api
Scenario Outline: The hospital sends a FHIR Patient resource.
Given
path '/Patient'
And
print resource
09:45:26.623 [print] {
"resourceType": "Patient",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRESPO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141290"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTORIA FERRER CRESPO",
"family": "FERRER",
"given": [
"VICTORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "qhayes@yahoo.com"
},
{
"system": "phone",
"value": "34 (364) 826-5042"
}
],
"gender": "female",
"birthDate": "2017-11-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:27.573 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:27.573 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OyniNE2Eir9Edbq9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14137/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14137/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:27.573 [print] {
"resourceType": "Patient",
"id": "14137",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:32.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTORIA <b>FERRER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141290</td></tr><tr><td>Date of birth</td><td><span>27 November 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRESPO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141290"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTORIA FERRER CRESPO",
"family": "FERRER",
"given": [
"VICTORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "qhayes@yahoo.com"
},
{
"system": "phone",
"value": "34 (364) 826-5042"
}
],
"gender": "female",
"birthDate": "2017-11-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:27.573 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:45:27.573 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"793"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:45:27.573 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OyniNE2Eir9Edbq9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14137/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 07:45:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Patient/14137/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 07:45:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:45:27.573 [print] {
"resourceType": "Patient",
"id": "14137",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:32.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTORIA <b>FERRER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141290</td></tr><tr><td>Date of birth</td><td><span>27 November 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRESPO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141290"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTORIA FERRER CRESPO",
"family": "FERRER",
"given": [
"VICTORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "qhayes@yahoo.com"
},
{
"system": "phone",
"value": "34 (364) 826-5042"
}
],
"gender": "female",
"birthDate": "2017-11-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
> *
print COOKIES
09:45:27.573 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:45:28.218 [print] {
"resourceType": "Patient",
"id": "14137",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T09:45:32.229+02:00",
"source": "#OyniNE2Eir9Edbq9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Patient-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">VICTORIA <b>FERRER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>141290</td></tr><tr><td>Date of birth</td><td><span>27 November 2017</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
"valueString": "CRESPO"
}
],
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.724.4.10.50.200",
"value": "141290"
}
],
"name": [
{
"use": "anonymous",
"text": "VICTORIA FERRER CRESPO",
"family": "FERRER",
"given": [
"VICTORIA"
]
}
],
"telecom": [
{
"system": "email",
"value": "qhayes@yahoo.com"
},
{
"system": "phone",
"value": "34 (364) 826-5042"
}
],
"gender": "female",
"birthDate": "2017-11-27",
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "es-ES",
"display": "Español"
}
]
}
}
]
}
When
print 'They try to delete the Patient resource from the server'
And
method DELETE
Then
status 200
And
print response
09:45:28.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Patient resource is on the server'
And
method GET
Then
status 410
And
print response
09:45:29.528 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T09:45:33.547+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T09:45:33.547+02:00"
}
]
}